本文整理汇总了PHP中Illuminate\Contracts\Foundation\Application::bound方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::bound方法的具体用法?PHP Application::bound怎么用?PHP Application::bound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Foundation\Application
的用法示例。
在下文中一共展示了Application::bound方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validate
/**
* Validate the request using the checkable class.
*
* @throws FailedCheckException
*/
public function validate()
{
if ($this->container->bound('illuminated.skipCheckableRequest')) {
return;
}
$check = $this->getCheckable();
$result = $check->check($this->assemble($this->request));
if ($result->failed()) {
$this->handleFailure($check, $result);
}
}
示例2: handle
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
{
$correlationalId = $request->attributes->get(CorrelationalId::HEADER);
if ($this->application->bound('sentry')) {
/** @var Raven_Client $sentry */
$sentry = $this->application->make('sentry');
$sentry->tags_context([self::TAG_NAME => $correlationalId]);
}
/** @var Response $response */
$response = $next($request);
return $response;
}
示例3: sendRequestThroughRouter
/**
* Send the given request through the middleware / router.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendRequestThroughRouter($request)
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
$shouldSkipMiddleware = $this->app->bound('middleware.disable') && $this->app->make('middleware.disable') === true;
return (new Pipeline($this->app))->send($request)->through($shouldSkipMiddleware ? [] : $this->middleware)->then($this->dispatchToRouter());
}