Ejemplo n.º 1
0
 public function getDownloader()
 {
     if (is_null($this->_http)) {
         $this->_http = Mage_HTTP_Client::getInstance();
     }
     return $this->_http;
 }
Ejemplo n.º 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();
     }
 }