Esempio n. 1
0
 public function subscribe(Dispatcher $event)
 {
     $key = get_class($this);
     $timer = Debugger::timer($key);
     $event->listen('*', function ($params) use($key, $event) {
         $execTime = Debugger::timer($key);
         // $dispatcher = static::findDispatcher();
         // $firing = array_get($dispatcher, 'dispatcher.args.0');
         $firing = $event->firing();
         $editorLink = Helper::getEditorLink(Helper::findSource());
         $this->attributes['totalTime'] += $execTime;
         $this->attributes['events'][] = compact('execTime', 'firing', 'params', 'editorLink');
     });
 }