Esempio n. 1
0
 /**
  * Initialize autoloading for modules and plugins
  */
 public function initAuloadMP()
 {
     $isSafeMode = $this->isSafeMode();
     $paths = array();
     $modulesDAO = new RM_Modules();
     $modules = $modulesDAO->fetchAll();
     foreach ($modules as $module) {
         if ($isSafeMode && $module->core == 0) {
             continue;
         }
         $bothPath = RM_Module_Manager::getModuleFolderpath($module->name, $this->_rootPath) . DIRECTORY_SEPARATOR;
         $paths[] = $bothPath . RM_Module_Config::CLASSES;
         $paths[] = $bothPath . RM_Module_Config::CONTROLLERS;
     }
     $pluginsDAO = new RM_Plugins();
     $plugins = $pluginsDAO->fetchAll();
     foreach ($plugins as $plugin) {
         if ($isSafeMode && $plugin->core == 0) {
             continue;
         }
         $bothPath = RM_Plugin_Manager::getPluginFolderpath($plugin->name, $this->_rootPath) . DIRECTORY_SEPARATOR;
         $paths[] = $bothPath . RM_Plugin_Config::CLASSES;
         $paths[] = $bothPath . RM_Plugin_Config::CONTROLLERS;
     }
     $MPPathString = implode(PATH_SEPARATOR, $paths);
     set_include_path(get_include_path() . PATH_SEPARATOR . $MPPathString);
 }