Mage_Dataflow_Model_Convert_Adapter_Http_Curl Class Reference

Inheritance diagram for Mage_Dataflow_Model_Convert_Adapter_Http_Curl:

Mage_Dataflow_Model_Convert_Adapter_Abstract Mage_Dataflow_Model_Convert_Container_Abstract Mage_Dataflow_Model_Convert_Adapter_Interface Mage_Dataflow_Model_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 Mage_Dataflow_Model_Convert_Adapter_Interface.

Definition at line 39 of file Curl.php.

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

save (  ) 

Implements Mage_Dataflow_Model_Convert_Adapter_Interface.

Definition at line 67 of file Curl.php.

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


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

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