Exemple #1
0
 /**
  * Returns an {@link EventCollection} instance created with the hooks from the `events` config.
  *
  * @param Core $app
  *
  * @return EventCollection
  */
 public static function get_events(Core $app)
 {
     static $events;
     if (!$events) {
         $events = new EventCollection($app->configs['event']);
         EventCollectionProvider::using(function () use($app) {
             return $app->events;
         });
     }
     return $events;
 }