Dingo\Api\Http\Response::setEventDispatcher PHP 메소드

setEventDispatcher() 공개 정적인 메소드

Set the event dispatcher instance.
public static setEventDispatcher ( Illuminate\Events\Dispatcher $events ) : void
$events Illuminate\Events\Dispatcher
리턴 void
    public static function setEventDispatcher(EventDispatcher $events)
    {
        static::$events = $events;
    }

Usage Example

예제 #1
0
 /**
  * Boot the service provider.
  *
  * @return void
  */
 public function boot()
 {
     $this->setupConfig();
     Http\Response::setFormatters($this->prepareConfigValues($this->app['config']['api.formats']));
     Http\Response::setTransformer($this->app['api.transformer']);
     Http\Response::setEventDispatcher($this->app['events']);
     $this->app->rebinding('api.routes', function ($app, $routes) {
         $app['api.url']->setRouteCollections($routes);
     });
 }
All Usage Examples Of Dingo\Api\Http\Response::setEventDispatcher