public function getDownloader() { if (is_null($this->_http)) { $this->_http = Mage_HTTP_Client::getInstance(); } return $this->_http; }
/** * Factory for HTTP client * @param string/false $protocol 'curl'/'socket' or false for auto-detect * @return Mage_HTTP_Client/Mage_Connect_Loader_Ftp */ public static function getInstance($protocol = '') { if ($protocol == 'ftp') { return new Mage_Connect_Loader_Ftp(); } else { return Mage_HTTP_Client::getInstance(); } }