本文整理汇总了PHP中Illuminate\Contracts\Foundation\Application::terminate方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::terminate方法的具体用法?PHP Application::terminate怎么用?PHP Application::terminate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Foundation\Application
的用法示例。
在下文中一共展示了Application::terminate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: terminate
/**
* Call the terminate method on any terminable middleware.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Response $response
* @return void
*/
public function terminate($request, $response)
{
foreach ($this->middleware as $middleware) {
$instance = $this->app->make($middleware);
if ($instance instanceof TerminableMiddleware) {
$instance->terminate($request, $response);
}
}
$this->app->terminate();
}
示例2: terminate
/**
* Call the terminate method on any terminable middleware.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Response $response
* @return void
*/
public function terminate($request, $response)
{
$routeMiddlewares = $this->gatherRouteMiddlewares($request);
foreach (array_merge($routeMiddlewares, $this->middleware) as $middleware) {
$instance = $this->app->make($middleware);
if ($instance instanceof TerminableMiddleware) {
$instance->terminate($request, $response);
}
}
$this->app->terminate();
}
示例3: terminate
/**
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Response $response
* @return void
*/
public function terminate($request, $response)
{
$middlewares = $this->app->shouldSkipMiddleware() ? [] : array_merge($this->gatherRouteMiddlewares($request), $this->middleware);
foreach ($middlewares as $middleware) {
list($name, $parameters) = $this->parseMiddleware($middleware);
$instance = $this->app->make($name);
if (method_exists($instance, 'terminate')) {
$instance->terminate($request, $response);
}
}
$this->app->terminate();
}
示例4: terminate
/**
* Terminate the application.
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @param int $status
* @return void
*/
public function terminate($input, $status)
{
$this->app->terminate();
}