本文整理汇总了PHP中Symfony\Component\HttpKernel\KernelInterface::shutdown方法的典型用法代码示例。如果您正苦于以下问题:PHP KernelInterface::shutdown方法的具体用法?PHP KernelInterface::shutdown怎么用?PHP KernelInterface::shutdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\HttpKernel\KernelInterface
的用法示例。
在下文中一共展示了KernelInterface::shutdown方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doRequest
/**
* {@inheritdoc}
*/
protected function doRequest($request)
{
if ($this->hasPerformedRequest) {
$this->kernel->shutdown();
$this->kernel->boot();
} else {
$this->hasPerformedRequest = true;
}
$this->refreshDoctrineConnection();
$response = $this->kernel->handle($request);
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($request, $response);
}
return $response;
}
示例2: ensureKernelShutdown
/**
* Shuts the kernel down if it was used in the test.
*/
protected static function ensureKernelShutdown()
{
if (null !== static::$kernel) {
$container = static::$kernel->getContainer();
static::$kernel->shutdown();
if ($container instanceof ResettableContainerInterface) {
$container->reset();
}
}
}
示例3: ensureKernelShutdown
/**
* Shuts the kernel down if it was used in the test.
*/
protected static function ensureKernelShutdown()
{
if (null !== static::$kernel) {
static::$kernel->shutdown();
}
}
示例4: tearDown
public function tearDown()
{
if ($this->kernel) {
$this->kernel->shutdown();
}
}
示例5: tearDown
/**
* Shuts the kernel down if it was used in the test.
*/
protected function tearDown()
{
if (null !== static::$kernel) {
static::$kernel->shutdown();
}
}
示例6: tearDown
/**
* @inheritdoc
*/
public function tearDown()
{
static::$kernel->shutdown();
}
示例7: tearDown
public function tearDown()
{
// Shutdown the kernel.
$this->kernel->shutdown();
parent::tearDown();
}
示例8: shutdown
/**
* {@inheritdoc}
*/
public function shutdown()
{
$this->kernel->shutdown();
}