Varien_Convert_Adapter_Http_Curl Class Reference

Inheritance diagram for Varien_Convert_Adapter_Http_Curl:

Varien_Convert_Adapter_Abstract Varien_Convert_Container_Abstract Varien_Convert_Adapter_Interface Varien_Convert_Container_Interface

List of all members.

Public Member Functions

 load ()
 save ()


Detailed Description

Definition at line 35 of file Curl.php.


Member Function Documentation

load (  ) 

Implements Varien_Convert_Adapter_Interface.

Definition at line 38 of file Curl.php.

00039     {
00040         // we expect <var name="uri">http://...</var>
00041         $uri = $this->getVar('uri');
00042 
00043         // validate input parameter
00044         if (!Zend_Uri::check($uri)) {
00045             $this->addException("Expecting a valid 'uri' parameter");
00046         }
00047 
00048         // use Varien curl adapter
00049         $http = new Varien_Http_Adapter_Curl;
00050 
00051         // send GET request
00052         $http->write('GET', $uri);
00053 
00054         // read the remote file
00055         $data = $http->read();
00056 
00057         $data = preg_split('/^\r?$/m', $data, 2);
00058         $data = trim($data[1]);
00059 
00060         // save contents into container
00061         $this->setData($data);
00062 
00063         return $this;
00064     }

save (  ) 

Implements Varien_Convert_Adapter_Interface.

Definition at line 66 of file Curl.php.

00067     {
00068         // no save implemented
00069         return $this;
00070     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:58 2009 for Magento by  doxygen 1.5.8