/** * Получить приложение * @access private * @param string $app Имя приложения * @param string $type Тип приожения * @return bool Статус загрузки приложения */ public function getApp($app, $typeApp = App::FRONTEND) { if (is_string($this->nameAppendix = $app)) { if (in_array($typeApp, Mr::Reflection('App')->getConstants())) { $this->forlderAppendices = Mr::gt('Env')->folderAppendicesSite; $this->folderAppendix = $this->forlderAppendices . $this->nameAppendix; if (!($loadStatus = $this->loadApp($typeApp))) { $this->forlderAppendices = Mr::gt('Env')->folderAppendicesCore; $this->folderAppendix = $this->forlderAppendices . $this->nameAppendix; $loadStatus = $this->loadApp($typeApp); } return $loadStatus; } else { Mr::exception('Параметр не является константой класса "' . get_class() . '"'); } } else { Mr::exception('Имя и тип приложения должны быть строкой.'); } }