private function install() { $installPath = $this->taoPath . '/tao/install/init.php'; if (!is_file($installPath)) { throw new Exception("InstallTaoTask require a tao package install should be found " . $installPath); } require_once $installPath; $installator = new tao_install_Installator(array('root_path' => $this->taoPath . '/', 'install_path' => $this->taoPath . '/tao/install/')); $installator->escapeCheck('custom_tao_ModRewrite'); $installator->install($this->taoConfig->toArray()); }
/** * Short description of method run * * @access public * @author firstname and lastname of author, <*****@*****.**> * @return mixed */ public function run() { $this->outVerbose("TAO is being installed. Please wait..."); try { $rootDir = dir(dirname(__FILE__) . '/../../'); $root = isset($this->parameters["root_path"]) ? $this->parameters["root_path"] : realpath($rootDir->path) . DIRECTORY_SEPARATOR; $installator = new tao_install_Installator(array('root_path' => $root, 'install_path' => $root . 'tao/install/')); // mod rewrite cannot be detected in CLI Mode. $installator->escapeCheck('custom_tao_ModRewrite'); $installator->install($this->options); } catch (Exception $e) { $this->err("A fatal error occured during installation: " . $e->getMessage(), true); } }