public function shutdown()
    {
        // dispatch shutdown event
        $applicationEvent = $this->getApplicationEvent();
        $applicationEvent->setName(self::EVENT_SYSTEM_SHUTDOWN);
        $this->emit($applicationEvent);

        exit((int)$this->isError());
    }