当前位置: 首页>>代码示例>>PHP>>正文


PHP Dispatcher::until方法代码示例

本文整理汇总了PHP中Illuminate\Events\Dispatcher::until方法的典型用法代码示例。如果您正苦于以下问题:PHP Dispatcher::until方法的具体用法?PHP Dispatcher::until怎么用?PHP Dispatcher::until使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Events\Dispatcher的用法示例。


在下文中一共展示了Dispatcher::until方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: filter

 /**
  * @param $route
  * @param $request
  * @param null $scope
  * @return null|BridgeResponse
  */
 public function filter($route, $request, $scope = null)
 {
     $beforeAccessResult = $this->dispatcher->until('oauth.access.before', array($scope));
     if ($beforeAccessResult) {
         return null;
     }
     /** @var BridgeRequest $bridgeRequest */
     $bridgeRequest = BridgeRequest::createFromRequest($request);
     $bridgeResponse = new BridgeResponse();
     $resController = $this->server->getResourceController();
     if (!$resController->verifyResourceRequest($bridgeRequest, $bridgeResponse, $scope)) {
         $this->dispatcher->fire('oauth.access.failed');
         return $bridgeResponse;
     }
     $token = $resController->getAccessTokenData($bridgeRequest, $bridgeResponse);
     $client = $this->clientRepo->find($token['client_id']);
     $tokenScope = $token['scope'];
     $user = null;
     if (isset($token['user_id'])) {
         $user = $this->userProvider->retrieveById($token['user_id']);
     }
     if ($tokenScope) {
         $tokenScope = explode(' ', $tokenScope);
     }
     $eventPayload = array($client, $user, $tokenScope);
     $this->dispatcher->fire('oauth.access.valid', $eventPayload);
 }
开发者ID:tappleby,项目名称:laravel-oauth2-server,代码行数:33,代码来源:AccessFilter.php

示例2: daemonShouldRun

 /**
  * Determine if the daemon should process on this iteration.
  *
  * @return bool
  */
 protected function daemonShouldRun()
 {
     if ($this->manager->isDownForMaintenance()) {
         return false;
     }
     return $this->events->until('illuminate.queue.looping') !== false;
 }
开发者ID:anthrotech,项目名称:laravel_sample,代码行数:12,代码来源:Worker.php

示例3: callRouteFilter

 /**
  * Call the given route filter.
  *
  * @param  string  $filter
  * @param  array  $parameters
  * @param  \Illuminate\Routing\Route  $route
  * @param  \Illuminate\Http\Request  $request
  * @param  \Illuminate\Http\Response|null $response
  * @return mixed
  */
 public function callRouteFilter($filter, $parameters, $route, $request, $response = null)
 {
     if (!$this->filtering) {
         return null;
     }
     $data = array_merge(array($route, $request, $response), $parameters);
     return $this->events->until('router.filter: ' . $filter, $this->cleanFilterParameters($data));
 }
开发者ID:GeorgeBroadley,项目名称:caffeine-vendor,代码行数:18,代码来源:Router.php

示例4: until

 /**
  * Fire an event until the first non-null response is returned.
  *
  * @param string|object $event
  * @param array $payload
  * @return mixed 
  * @static 
  */
 public static function until($event, $payload = array())
 {
     return \Illuminate\Events\Dispatcher::until($event, $payload);
 }
开发者ID:satriashp,项目名称:tour,代码行数:12,代码来源:_ide_helper.php

示例5: daemonShouldRun

 /**
  * Determine if the daemon should process on this iteration.
  *
  * @return bool
  */
 protected function daemonShouldRun()
 {
     return $this->events->until('illuminate.queue.looping') !== false;
 }
开发者ID:qinxiao1986,项目名称:complete-laravel4,代码行数:9,代码来源:Worker.php


注:本文中的Illuminate\Events\Dispatcher::until方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。