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


PHP Dispatcher::until方法代码示例

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


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

示例1: 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:AlexCutts,项目名称:framework,代码行数:12,代码来源:Worker.php

示例2: getCustomRelationship

 /**
  * Get a custom relationship.
  *
  * @param mixed $model
  * @param string $name
  * @return Relationship|null
  */
 protected function getCustomRelationship($model, $name)
 {
     $relationship = static::$dispatcher->until(new GetApiRelationship($this, $name, $model));
     if ($relationship && !$relationship instanceof Relationship) {
         throw new LogicException('GetApiRelationship handler must return an instance of ' . Relationship::class);
     }
     return $relationship;
 }
开发者ID:asifalimd,项目名称:core,代码行数:15,代码来源:AbstractSerializer.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:sporchia,项目名称:framework,代码行数:18,代码来源:Router.php

示例4: getCustomRelationship

 /**
  * Get a custom relationship.
  *
  * @param string $name
  * @return BuilderInterface|null
  */
 protected function getCustomRelationship($name)
 {
     $builder = static::$dispatcher->until(new GetApiRelationship($this, $name));
     if ($builder && !$builder instanceof BuilderInterface) {
         throw new LogicException('GetApiRelationship handler must return an instance of ' . BuilderInterface::class);
     }
     return $builder;
 }
开发者ID:RudolfFussek,项目名称:core,代码行数:14,代码来源:AbstractSerializer.php

示例5: daemonShouldRun

 /**
  * Determine if the daemon should process on this iteration.
  *
  * @return bool
  */
 protected function daemonShouldRun()
 {
     if ($this->manager->isDownForMaintenance() || $this->events->until('illuminate.queue.looping') === false) {
         // If the application is down for maintenance or doesn't want the queues to run
         // we will sleep for one second just in case the developer has it set to not
         // sleep at all. This just prevents CPU from maxing out in this situation.
         $this->sleep(1);
         return false;
     }
     return true;
 }
开发者ID:bryanashley,项目名称:framework,代码行数:16,代码来源:Worker.php

示例6: 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
  *
  * @deprecated since version 5.1.
  */
 public function callRouteFilter($filter, $parameters, $route, $request, $response = null)
 {
     $data = array_merge([$route, $request, $response], $parameters);
     return $this->events->until('router.filter: ' . $filter, $this->cleanFilterParameters($data));
 }
开发者ID:hushibing,项目名称:laravel-5-blog,代码行数:17,代码来源:Router.php

示例7: fireSluggingEvent

 /**
  * Fire the namespaced validating event.
  *
  * @param  \Illuminate\Database\Eloquent\Model $model
  * @param  string $event
  * @return mixed
  */
 protected function fireSluggingEvent(Model $model, $event)
 {
     return $this->events->until('eloquent.slugging: ' . get_class($model), [$model, $event]);
 }
开发者ID:hilltool,项目名称:eloquent-sluggable,代码行数:11,代码来源:SluggableObserver.php


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