Public Member Functions | |
addAction (Mage_Dataflow_Model_Convert_Action_Interface $action=null) | |
setContainers (Mage_Dataflow_Model_Convert_Container_Collection $containers) | |
getContainers () | |
getContainer ($name=null) | |
addContainer ($name, Mage_Dataflow_Model_Convert_Container_Interface $container) | |
getExceptions () | |
getDryRun () | |
setDryRun ($flag) | |
addException (Mage_Dataflow_Model_Convert_Exception $e) | |
importXml (Varien_Simplexml_Element $profileNode) | |
run () | |
setDataflowProfile ($profile) | |
getDataflowProfile () | |
Protected Attributes | |
$_actions | |
$_containers | |
$_exceptions = array() | |
$_dryRun | |
$_actionDefaultClass = 'Mage_Dataflow_Model_Convert_Action' | |
$_containerCollectionDefaultClass = 'Mage_Dataflow_Model_Convert_Container_Collection' | |
$_dataflow_profile = null |
Definition at line 34 of file Abstract.php.
addAction | ( | Mage_Dataflow_Model_Convert_Action_Interface $ | action = null |
) |
Definition at line 52 of file Abstract.php.
00053 { 00054 if (is_null($action)) { 00055 $action = new $this->_actionDefaultClass(); 00056 } 00057 $this->_actions[] = $action; 00058 $action->setProfile($this); 00059 return $action; 00060 }
addContainer | ( | $ | name, | |
Mage_Dataflow_Model_Convert_Container_Interface $ | container | |||
) |
Definition at line 84 of file Abstract.php.
00085 { 00086 $container = $this->getContainers()->addItem($name, $container); 00087 $container->setProfile($this); 00088 return $container; 00089 }
addException | ( | Mage_Dataflow_Model_Convert_Exception $ | e | ) |
getContainer | ( | $ | name = null |
) |
Definition at line 76 of file Abstract.php.
00077 { 00078 if (is_null($name)) { 00079 $name = '_default'; 00080 } 00081 return $this->getContainers()->getItem($name); 00082 }
getContainers | ( | ) |
Definition at line 68 of file Abstract.php.
00069 { 00070 if (!$this->_containers) { 00071 $this->_containers = new $this->_containerCollectionDefaultClass(); 00072 } 00073 return $this->_containers; 00074 }
getDataflowProfile | ( | ) |
getDryRun | ( | ) |
getExceptions | ( | ) |
importXml | ( | Varien_Simplexml_Element $ | profileNode | ) |
Definition at line 113 of file Abstract.php.
00114 { 00115 foreach ($profileNode->action as $actionNode) { 00116 $action = $profile->addAction(); 00117 $action->importXml($actionNode); 00118 } 00119 00120 return $this; 00121 }
run | ( | ) |
Run current action
Implements Mage_Dataflow_Model_Convert_Profile_Interface.
Definition at line 123 of file Abstract.php.
00124 { 00125 // print '<pre>'; 00126 // print_r($this->_dataflow_profile); 00127 // print '</pre>'; 00128 00129 if (!$this->_actions) { 00130 $e = new Mage_Dataflow_Model_Convert_Exception("Could not find any actions for this profile"); 00131 $e->setLevel(Mage_Dataflow_Model_Convert_Exception::FATAL); 00132 $this->addException($e); 00133 return; 00134 } 00135 00136 foreach ($this->_actions as $action) { 00137 /* @var $action Mage_Dataflow_Model_Convert_Action */ 00138 try { 00139 $action->run(); 00140 } 00141 catch (Exception $e) { 00142 $dfe = new Mage_Dataflow_Model_Convert_Exception($e->getMessage()); 00143 $dfe->setLevel(Mage_Dataflow_Model_Convert_Exception::FATAL); 00144 $this->addException($dfe); 00145 return ; 00146 } 00147 } 00148 return $this; 00149 }
setContainers | ( | Mage_Dataflow_Model_Convert_Container_Collection $ | containers | ) |
setDataflowProfile | ( | $ | profile | ) |
Definition at line 151 of file Abstract.php.
00151 { 00152 if (is_array($profile)) { 00153 $this->_dataflow_profile = $profile; 00154 } 00155 return $this; 00156 }
setDryRun | ( | $ | flag | ) |
$_actionDefaultClass = 'Mage_Dataflow_Model_Convert_Action' [protected] |
Definition at line 46 of file Abstract.php.
$_actions [protected] |
Definition at line 38 of file Abstract.php.
$_containerCollectionDefaultClass = 'Mage_Dataflow_Model_Convert_Container_Collection' [protected] |
Definition at line 48 of file Abstract.php.
$_containers [protected] |
Definition at line 40 of file Abstract.php.
$_dataflow_profile = null [protected] |
Definition at line 50 of file Abstract.php.
$_dryRun [protected] |
Definition at line 44 of file Abstract.php.
$_exceptions = array() [protected] |
Definition at line 42 of file Abstract.php.