/** * 初始化模块 */ private function init() { if ($this->_ctrnSpace === null) { $trn = str_replace(\H2O::getAppRootPath(), '', $this->_basePath); $trn = str_replace('/', '\\', $trn); $trn = strpos($trn, '\\') === false ? '\\' . $trn : $trn; $this->_ctrnSpace = \H2O::APP_ROOT_NAME . $trn . '\\controllers'; } }
/** * 初始化 */ public function __construct() { $version = \H2O::getAppConfigs('version'); if (empty($version)) { throw new \Exception("Config set error: lost version param!"); } $nv = 'v' . str_replace('.', '', $version); $this->_migratedir = \H2O::getAppRootPath() . DS . 'migrate' . DS . $nv; $this->_namespace = \H2O::APP_ROOT_NAME . '\\migrate\\' . $nv; //命名空间 $this->_tpldir = H2O_PATH . DS . 'tpls' . DS . 'migrate' . DS; //迁移模块路径 file::createDirectory($this->_migratedir); //创建目录 $this->_runenv = \H2O::getRunEnv(); }
/** * 构造函数 */ public function __construct() { $this->_apppath = \H2O::getAppRootPath(); }