本文整理汇总了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);