Flarum\Api\Serializer\AbstractSerializer::setEventDispatcher PHP 메소드

setEventDispatcher() 공개 정적인 메소드

public static setEventDispatcher ( Illuminate\Contracts\Events\Dispatcher $dispatcher )
$dispatcher Illuminate\Contracts\Events\Dispatcher
    public static function setEventDispatcher(Dispatcher $dispatcher)
    {
        static::$dispatcher = $dispatcher;
    }

Usage Example

예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function boot()
 {
     $this->registerNotificationSerializers();
     AbstractSerializeController::setContainer($this->app);
     AbstractSerializeController::setEventDispatcher($events = $this->app->make('events'));
     AbstractSerializer::setContainer($this->app);
     AbstractSerializer::setEventDispatcher($events);
 }