[Li Jingshan php] every day laravel-20160901| Dispatcher-1

Source: Internet
Author: User

namespace illuminate\events;use exception;use reflectionclass;use illuminate\support\str; use illuminate\container\container;use illuminate\contracts\broadcasting\shouldbroadcast;use  Illuminate\contracts\broadcasting\shouldbroadcastnow;use illuminate\contracts\events\dispatcher as  dispatchercontract;use illuminate\contracts\container\container as containercontract;//  use namespaceclass Dispatcher implements DispatcherContract{// a  dispatcher implements dispatcher contract    /**      * The IoC container instance.     *      *  @var  \Illuminate\Contracts\Container\Container     */     protected  $container;// the ioc container instance.     /**     * the registered event listeners.     *      *  @var  array     */    protected $ listeners = [];// listeners be registered    /**      * The wildcard listeners.     *      *  @var  array     */    protected $ wildcards = [];// the wildcard listeners. like store     /**     * The sorted event listeners.      *     *  @var  array     */     protected  $sorted  = [];// The sorted event listeners.     /**     * the event firing stack.     *      *  @var  array     */    protected  $firing  = [];//The event firing stack.    /**      * The queue resolver instance.     *      *  @var  callable     */    protected $ queueresolver;// the queue resolver instance.   // at last , we find to instance ,some listeners    /**      * Create a new event dispatcher instance.      *     *  @param   \illuminate\contracts\container\container|null    $container   &Nbsp;  *  @return  void     */   // dispathcer  is use to make it like you want    public  Function __construct (containercontract  $container  = null)     {          $this->container =  $container  ?: new  container;    }// containercontract is  $contanier


This article is from the "Focus on PHP" blog, please be sure to keep this source http://jingshanls.blog.51cto.com/3357095/1789766

[Li Jingshan php] every day laravel-20160901| Dispatcher-1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.