当前位置: 首页>>代码示例>>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;未经允许,请勿转载。