protected function _prepare() { // Intialize the timer class $timer = AliceFactory::getTimer(); // Do we have a tag? if (!empty($this->_parametersArray['tag'])) { $this->tag = $this->_parametersArray['tag']; } // Save the log to analyze $registry = AliceFactory::getConfiguration(); $registry->set('volatile.alice.logToAnalyze', $this->_parametersArray['logToAnalyze']); // Make sure a tag exists (or create a new one) $this->tag = $this->getTag(); // Reset the log AliceUtilLogger::openLog($this->tag); AliceUtilLogger::ResetLog($this->tag); set_error_handler('aliceBackupErrorHandler'); // Reset the storage AliceUtilTempvars::reset($this->tag); // Get the domain chain $this->domain_chain = AliceUtilScripting::getDomainChain(); $this->total_steps = count($this->domain_chain) - 1; // Init shouldn't count in the progress bar // Mark this engine for Nesting Logging $this->nest_logging = true; // Preparation is over $this->array_cache = null; $this->setState('prepared'); //restore_error_handler(); }
public function domains() { $return = array(); $domains = AliceUtilScripting::getDomainChain(); foreach ($domains as $domain) { $return[] = array($domain['domain'], $domain['name']); } @ob_end_clean(); header('Content-type: text/plain'); echo '###' . json_encode($return) . '###'; flush(); JFactory::getApplication()->close(); }