/**
  * @return $this
  */
 public function bootstrap($externalEvent)
 {
     if ($this->bootstrapFlag) {
         return;
     }
     // assign application directory path
     if (!$this->getDirectory()) {
         $this->setDirectory(realpath($this->getClassPath(get_class($this)) . '/..'));
     }
     // set event being dispatched
     $this->setCurrentEvent($externalEvent);
     // create event context
     $this->context = $externalEvent->createContext();
     $this->addPathAliases();
     $this->autoloadExtensions();
     $this->flattenManifestFile($externalEvent);
     $this->buildApp();
     $this->addServices();
     $this->assignActions();
     $this->assignEventListeners();
     $this->addRouter('\\PHPCrystal\\PHPCrystal\\Service\\Router\\_Default');
     parent::dispatch(Event\Type\System\PkgNotification::create('load-config-file'));
     parent::dispatch(Event\Type\System\PkgNotification::create('init-routing'));
     $this->bootstrapFlag = true;
     return $this;
 }