本文整理匯總了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());
}