Mage_Dataflow_Model_Convert_Iterator_Http Class Reference

Inheritance diagram for Mage_Dataflow_Model_Convert_Iterator_Http:

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 ()


Detailed Description

Definition at line 35 of file Http.php.


Member Function Documentation

load (  ) 

Implements Mage_Dataflow_Model_Convert_Adapter_Interface.

Definition at line 37 of file Http.php.

00038     {
00039         if (!$_FILES) {
00040 ?>
00041 <form method="POST" enctype="multipart/form-data">
00042 File to upload: <input type="file" name="io_file"/> <input type="submit" value="Upload"/>
00043 </form>
00044 <?php
00045             exit;
00046         }
00047         if (!empty($_FILES['io_file']['tmp_name'])) {
00048             //$this->setData(file_get_contents($_FILES['io_file']['tmp_name']));
00049             $uploader = new Varien_File_Uploader('io_file');
00050             $uploader->setAllowedExtensions(array('csv','xml'));
00051             $path = Mage::app()->getConfig()->getTempVarDir().'/import/';
00052             $uploader->save($path);
00053             if ($uploadFile = $uploader->getUploadedFileName()) {
00054                 $fp = fopen($uploadFile, 'rb');
00055                 while ($row = fgetcsv($fp)) {
00056 
00057                 }
00058                 fclose($fp);
00059             }
00060         }
00061         return $this;
00062     }


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