/** * Load certain module by using its main config file * * @param string $moduleKey * @param string $moduleFile * * @return Aitoc_Aitsys_Model_Module */ protected function _makeModuleByModuleFile($moduleKey, $moduleFile) { $this->tool()->testMsg('Check: ' . $moduleKey . ' -- ' . $moduleFile); // check if module was already loaded during licensed modules load if ($module = isset($this->_modules[$moduleKey]) ? $this->_modules[$moduleKey] : null) { return $module; } $this->tool()->testMsg('Create: ' . $moduleKey); $module = new Aitoc_Aitsys_Model_Module(); $module->loadByModuleFile($moduleFile, $moduleKey); if ($this->isIgnoredModule($moduleKey)) { $module->setErrorMessageType($this->_moduleIgnoreList[$moduleKey]); } return $this->_modules[$moduleKey] = $module; }
/** * * @param $path * @return Aitoc_Aitsys_Model_Module */ protected function _makeModuleByModuleFile($path) { $moduleFile = new SplFileInfo($path); $file = $moduleFile->getFilename(); list($key) = explode('.', $file); $this->tool()->testMsg('Check: ' . $key . ' -- ' . $file); if ($module = isset($this->_modules[$key]) ? $this->_modules[$key] : null) { return $module; } $this->tool()->testMsg('Create: ' . $key); $module = new Aitoc_Aitsys_Model_Module(); $module->loadByModuleFile($path, $key); return $this->_modules[$key] = $module; }
/** * Load certain module by using its main config file * * @param string $moduleKey * @param string $moduleFile * * @return Aitoc_Aitsys_Model_Module */ protected function _makeModuleByModuleFile($moduleKey, $moduleFile, $ignore = false) { $this->tool()->testMsg('Load module: ' . $moduleKey); $module = new Aitoc_Aitsys_Model_Module(); $module->loadByModuleFile($moduleFile, $moduleKey); $module->setIgnore($ignore); return $this->_modules[$moduleKey] = $module; }