本文整理匯總了PHP中Nette\Application\UI\Presenter::sendResponse方法的典型用法代碼示例。如果您正苦於以下問題:PHP Presenter::sendResponse方法的具體用法?PHP Presenter::sendResponse怎麽用?PHP Presenter::sendResponse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Nette\Application\UI\Presenter
的用法示例。
在下文中一共展示了Presenter::sendResponse方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sendResponse
public function sendResponse(IResponse $response)
{
if ($this->tidy->isEnabled() && $response instanceof TextResponse && $response->getSource() instanceof ITemplate) {
$response = new TidyResponse($response, $this->tidy);
}
parent::sendResponse($response);
}
示例2: sendResponse
public function sendResponse(Nette\Application\IResponse $response)
{
if ($response instanceof Nette\Application\Responses\TextResponse && $response->source instanceof Nette\Templating\ITemplate) {
echo Helpers::renderTemplate($response->source);
} else {
parent::sendResponse($response);
}
}
示例3: tryJsonResponse
public static function tryJsonResponse(Presenter $presenter)
{
if (empty(self::$jsonResoponseItems)) {
return;
}
$payload = array("type" => "JsonDependentSelectBoxResponse", "items" => array());
foreach (self::$jsonResoponseItems as $item) {
$payload["items"][$item->getHtmlId()] = array("selected" => $item->getValue(), "items" => $item->getItems());
}
$response = new JsonResponse($payload);
$presenter->sendResponse($response);
}
示例4: sendResponse
public final function sendResponse(Application\IResponse $response)
{
if ($this->innerCall) {
parent::sendResponse($response);
}
$this->amfManager->setResponse($response);
if ($this->amfManager->hasMoreMessages()) {
$request = $this->amfManager->createApplicationRequest();
parent::sendResponse(new Application\Responses\ForwardResponse($request));
} else {
parent::sendResponse(new FinalResponse($this->amfManager));
}
}
示例5: sendResponse
public function sendResponse(\Nette\Application\IResponse $response)
{
if ($response instanceof \Nette\Application\Responses\JsonResponse) {
$response->send($this->getHttpRequest(), $this->getHttpResponse());
} else {
parent::sendResponse($response);
}
}