/** * Retrieve object of config and set it to Mage_Connect_Command * * @return Mage_Connect_Config */ public function getConfig() { if (!$this->_config) { $this->_config = new Mage_Connect_Config(); $ftp = $this->_config->__get('remote_config'); if (!empty($ftp)) { $packager = new Mage_Connect_Packager(); list($cache, $config, $ftpObj) = $packager->getRemoteConf($ftp); $this->_config = $config; $this->_sconfig = $cache; } $this->_config->magento_root = dirname(dirname(__FILE__)) . DS . '..'; //Mage_Connect_Command::setConfigObject($this->_config); } return $this->_config; }
/** * Get Auth data from config * @param Mage_Connect_Config $config * @return array auth data */ private function _getAuth($config) { $auth = $config->__get('auth'); $auth = explode('@', $auth); return $auth; }