當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。