本文整理汇总了PHP中http::freeze方法的典型用法代码示例。如果您正苦于以下问题:PHP http::freeze方法的具体用法?PHP http::freeze怎么用?PHP http::freeze使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类http
的用法示例。
在下文中一共展示了http::freeze方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute()
{
http::freeze();
//a Spirit Cannot send any HTTP Header unless It is used as ResponseService
$this->engine->executeLogic();
http::release();
http::contentType('application/json');
return json_encode($this->engine->xdo());
}
示例2: execute
public function execute()
{
http::freeze();
//a Spirit Cannot send any HTTP Header unless It is used as ResponseService
$this->engine->run();
http::release();
http::contentType('text/xml');
return $this->engine->xdo()->toXML()->saveXML();
}
示例3: call
/**
* \virtual
* @param string $methodName
* @param array $args
*/
public function call($methodName, $args = array())
{
$this->spiritEngine->setActiveInstance($this->_activeInstanceId);
http::freeze();
//a Spirit Cannot send any HTTP Header unless It is used as ResponseService. as the spirit output is embedded in the app output. so its the app that sends the header. not the spirit
$this->spiritEngine->run($this->spiritName, $methodName, $args);
http::release();
//Engine Automatically Clear's the Active Instance Id So no need to call clear Explecitely
return $this->spiritEngine->response();
}
示例4: execute
public function execute()
{
http::freeze();
//a Spirit Cannot send any HTTP Header unless It is used as ResponseService
$this->engine->run();
http::release();
$xdo = $this->engine->xdo();
$navigation = $this->engine->getNavigation();
if (isset($xdo->{$navigation->propertyName})) {
$value = $xdo->{$navigation->propertyName};
if (is_array($value) || is_object($value)) {
http::contentType('application/json');
return json_encode($value);
} else {
http::contentType('text/plain');
return $value;
}
}
return null;
}