示例#1
0
 public function getDownloader()
 {
     if (is_null($this->_http)) {
         $this->_http = Mage_HTTP_Client::getInstance();
     }
     return $this->_http;
 }
示例#2
0
 /**
  * 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();
     }
 }