本文整理匯總了PHP中AppKernel::terminate方法的典型用法代碼示例。如果您正苦於以下問題:PHP AppKernel::terminate方法的具體用法?PHP AppKernel::terminate怎麽用?PHP AppKernel::terminate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AppKernel
的用法示例。
在下文中一共展示了AppKernel::terminate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: run
public function run()
{
$response = $this->kernel->handle($this->request);
$response->send();
$this->kernel->terminate($this->request, $response);
}
示例2: AppKernel
<?php
use Symfony\Component\HttpFoundation\Request;
$loader = (require_once __DIR__ . '/../app/bootstrap.php.cache');
require_once __DIR__ . '/../app/AppKernel.php';
$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
示例3: AppKernel
<?php
return;
// @todo replace with a better check
// @todo using filesystem ACLs is recommended, but what should we do by default?
//umask(0002); // This will let the permissions be 0775
umask(00);
// This will let the permissions be 0777
use ZenMagick\Http\Request;
//$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__ . '/../app/autoload.php';
require_once __DIR__ . '/../app/AppKernel.php';
// @todo remove context from here altogether!
$application = new AppKernel('install', true, 'admin');
//$application->loadClassCache();
$request = Request::createFromGlobals();
$response = $application->handle($request);
$response->send();
$application->terminate($request, $response);