src/Application/Application.php
public function terminate()
    {
        /** @var EventHandler $eventHandler */
        $eventHandler = $this->getService('event-handler');

        $eventHandler->getEvent(TerminateApplication::class)->attach(new LogBeforeTerminate());
        $eventHandler->getEvent(TerminateApplication::class)->attach(new ExitApplication());

        $eventHandler->fire(TerminateApplication::class, ['app' => $this]);
    }
public function terminate()
    {
        /** @var EventHandler $eventHandler */
        $eventHandler = $this->getService('event-handler');

        $eventHandler->getEvent(TerminateApplication::class)->attach(new LogBeforeTerminate());
        $eventHandler->getEvent(TerminateApplication::class)->attach(new ExitApplication());

        $eventHandler->fire(TerminateApplication::class, ['app' => $this]);
    }
public function terminate ( ) { /** @var EventHandler $eventHandler */ $ eventHandler = $ this -> getService ( 'event-handler' ) ; $ eventHandler -> getEvent ( TerminateApplication :: class ) -> attach ( new LogBeforeTerminate ( ) ) ; $ eventHandler -> getEvent ( TerminateApplication :: class ) -> attach ( new ExitApplication ( ) ) ; $ eventHandler -> fire ( TerminateApplication :: class , [ 'app' => $ this ] ) ; }
Fire TerminateApplication event
with two framework watchers.
One to log and one to actually exit.
Fire TerminateApplication event with two framework watchers . One to log and one to actually exit .