首页 > Web开发 > 详细

[李景山php]每天laravel-20160904|Dispatcher-4

时间:2016-06-21 11:03:20      阅读:259      评论:0      收藏:0      [点我收藏+]
   /**
    * Resolve the subscriber instance.
    *
    * @param  object|string  $subscriber
    * @return mixed
    */
   protected function resolveSubscriber($subscriber)
   {
       if (is_string($subscriber)) {// check string
           return $this->container->make($subscriber);// make it
       }

       return $subscriber;// then subscriber return
   }

   /**
    * Fire an event until the first non-null response is returned.
    *
    * @param  string|object  $event
    * @param  array  $payload
    * @return mixed
    */
   public function until($event, $payload = [])
   {
       return $this->fire($event, $payload, true);// fire start by event and payload
   }

   /**
    * Flush a set of pushed events.
    *
    * @param  string  $event
    * @return void
    */
   public function flush($event)
   {
       $this->fire($event.‘_pushed‘);// fire a string like we want $event_pushed
   }// flush a set of pushed events
// flush a way

   /**
    * Get the event that is currently firing.
    *
    * @return string
    */
   public function firing()
   {
       return last($this->firing);
   }// use last function


本文出自 “专注php” 博客,请务必保留此出处http://jingshanls.blog.51cto.com/3357095/1791231

[李景山php]每天laravel-20160904|Dispatcher-4

原文:http://jingshanls.blog.51cto.com/3357095/1791231

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!