Exemplo n.º 1
0
 /**
  * Запуск менеджера проекта
  */
 public static function start($serviceName = null)
 {
     if (empty(self::$Mr)) {
         self::$_Mr = new Mr();
         foreach (scandir(GLISS_DIR . 'kernel/service/') as $fileService) {
             if ($fileService != '.' && $fileService != '..') {
                 if (is_file(GLISS_DIR . 'kernel/service/' . $fileService)) {
                     $Service = str_replace('.class.php', null, $fileService);
                     if (empty(self::$_Mr->_Services->{$Service})) {
                         include_once GLISS_DIR . 'kernel/service/' . $fileService;
                         $Object = new $Service();
                         self::$_Mr->_Services->{get_class($Object)} = $Object;
                     }
                 }
             }
         }
     }
 }