original_string: protected function registerEvent($name, Closure $callback)
      {
          if (! isset(static::$dispatcher)) {
              $this->initEventDispatcher();
          }
  
          static::$dispatcher->listen($name, $callback);
      }
code: protected function registerEvent($name, Closure $callback)
      {
          if (! isset(static::$dispatcher)) {
              $this->initEventDispatcher();
          }
  
          static::$dispatcher->listen($name, $callback);
      }
code_tokens: protected function registerEvent ( $ name , Closure $ callback ) { if ( ! isset ( static :: $ dispatcher ) ) { $ this -> initEventDispatcher ( ) ; } static :: $ dispatcher -> listen ( $ name , $ callback ) ; }
docstring: Register an event for the dispatcher to listen for.
  
  @param  string   $name
  @param  Closure  $callback
  @return void
docstring_tokens: Register an event for the dispatcher to listen for .