protected function onStar() { $event = new \App\Source\Events\BaseAppEvent($this); if ($this->getContainer()->offsetExists('dispatcher')) { $this->getContainer()->dispatcher->dispatch('app.beforeRun', $event); } }