src/Traits/EventDispatcher.php
protected function registerEvent($name, Closure $callback)
    {
        if (! isset(static::$dispatcher)) {
            $this->initEventDispatcher();
        }

        static::$dispatcher->listen($name, $callback);
    }
protected function registerEvent($name, Closure $callback)
    {
        if (! isset(static::$dispatcher)) {
            $this->initEventDispatcher();
        }

        static::$dispatcher->listen($name, $callback);
    }
protected function registerEvent ( $ name , Closure $ callback ) { if ( ! isset ( static :: $ dispatcher ) ) { $ this -> initEventDispatcher ( ) ; } static :: $ dispatcher -> listen ( $ name , $ callback ) ; }
Register an event for the dispatcher to listen for.

@param  string   $name
@param  Closure  $callback
@return void
Register an event for the dispatcher to listen for .