
Public Member Functions | |
| getFieldList () | |
| parseFieldList ($row) | |
| getIoAdapter () | |
| getBatchExportModel () | |
| getBatchImportModel () | |
| beforeFinish () | |
| setParams ($data) | |
| getParams () | |
Public Attributes | |
| const | LIFETIME = 86400 |
Protected Member Functions | |
| _construct () | |
| _beforeSave () | |
| _afterDelete () | |
Protected Attributes | |
| $_fieldList = array() | |
| $_ioAdapter | |
| $_batchExport | |
| $_batchImport | |
Definition at line 35 of file Batch.php.
| _afterDelete | ( | ) | [protected] |
Processing object after delete data
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 126 of file Batch.php.
00127 { 00128 $this->getIoAdapter()->clear(); 00129 }
| _beforeSave | ( | ) | [protected] |
Processing object before save data
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 119 of file Batch.php.
00120 { 00121 if (is_null($this->getData('created_at'))) { 00122 $this->setData('created_at', Mage::getSingleton('core/date')->gmtDate()); 00123 } 00124 }
| _construct | ( | ) | [protected] |
Init model
Reimplemented from Varien_Object.
Definition at line 75 of file Batch.php.
00076 { 00077 $this->_init('dataflow/batch'); 00078 }
| beforeFinish | ( | ) |
Run finish actions for Adapter
Definition at line 165 of file Batch.php.
00166 { 00167 if ($this->getAdapter()) { 00168 $adapter = Mage::getModel($this->getAdapter()); 00169 if (method_exists($adapter, 'finish')) { 00170 $adapter->finish(); 00171 } 00172 } 00173 }
| getBatchExportModel | ( | ) |
Retrieve Batch export model
Definition at line 136 of file Batch.php.
00137 { 00138 if (is_null($this->_batchExport)) { 00139 $object = Mage::getModel('dataflow/batch_export'); 00140 $object->setBatchId($this->getId()); 00141 $this->_batchExport = Varien_Object_Cache::singleton()->save($object); 00142 } 00143 return Varien_Object_Cache::singleton()->load($this->_batchExport); 00144 }
| getBatchImportModel | ( | ) |
Retrieve Batch import model
Definition at line 151 of file Batch.php.
00152 { 00153 if (is_null($this->_batchImport)) { 00154 $object = Mage::getModel('dataflow/batch_import'); 00155 $object->setBatchId($this->getId()); 00156 $this->_batchImport = Varien_Object_Cache::singleton()->save($object); 00157 } 00158 return Varien_Object_Cache::singleton()->load($this->_batchImport); 00159 }
| getFieldList | ( | ) |
| getIoAdapter | ( | ) |
Retrieve Io Adapter
Definition at line 110 of file Batch.php.
00111 { 00112 if (is_null($this->_ioAdapter)) { 00113 $this->_ioAdapter = Mage::getModel('dataflow/batch_io'); 00114 $this->_ioAdapter->init($this); 00115 } 00116 return $this->_ioAdapter; 00117 }
| getParams | ( | ) |
| parseFieldList | ( | $ | row | ) |
Parse row fields
| array | $row |
Definition at line 95 of file Batch.php.
00096 { 00097 foreach ($row as $fieldName => $value) { 00098 if (!in_array($fieldName, $this->_fieldList)) { 00099 $this->_fieldList[$fieldName] = $fieldName; 00100 } 00101 } 00102 unset($fieldName, $value, $row); 00103 }
| setParams | ( | $ | data | ) |
1.5.8