當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Application::bound方法代碼示例

本文整理匯總了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);
     }
 }
開發者ID:sellerlabs,項目名稱:illuminated,代碼行數:16,代碼來源:CheckableRequest.php

示例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;
 }
開發者ID:devitek,項目名稱:laravel-correlational-id,代碼行數:20,代碼來源:CorrelationalIdSentry.php

示例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());
 }
開發者ID:nelson6e65,項目名稱:framework,代碼行數:14,代碼來源:Kernel.php


注:本文中的Illuminate\Contracts\Foundation\Application::bound方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。