
Public Member Functions | |
| getVar ($key, $default=null) | |
| getVars () | |
| setVar ($key, $value=null) | |
| getAction () | |
| setAction (Mage_Dataflow_Model_Convert_Action_Interface $action) | |
| getProfile () | |
| setProfile (Mage_Dataflow_Model_Convert_Profile_Interface $profile) | |
| getData () | |
| setData ($data) | |
| validateDataString ($data=null) | |
| validateDataArray ($data=null) | |
| validateDataGrid ($data=null) | |
| getGridFields ($grid) | |
| addException ($error, $level=null) | |
| getPosition () | |
| setPosition ($position) | |
| setBatchParams ($data) | |
| getBatchParams ($key=null) | |
Protected Attributes | |
| $_batchParams = array() | |
| $_vars | |
| $_profile | |
| $_action | |
| $_data | |
| $_position | |
Definition at line 35 of file Abstract.php.
| addException | ( | $ | error, | |
| $ | level = null | |||
| ) |
Definition at line 161 of file Abstract.php.
00162 { 00163 $e = new Mage_Dataflow_Model_Convert_Exception($error); 00164 $e->setLevel(!is_null($level) ? $level : Mage_Dataflow_Model_Convert_Exception::NOTICE); 00165 $e->setContainer($this); 00166 $e->setPosition($this->getPosition()); 00167 00168 if ($this->getProfile()) { 00169 $this->getProfile()->addException($e); 00170 } 00171 00172 return $e; 00173 }
| getAction | ( | ) |
| getBatchParams | ( | $ | key = null |
) |
Definition at line 194 of file Abstract.php.
00195 { 00196 if (!empty($key)) { 00197 return isset($this->_batchParams[$key]) ? $this->_batchParams[$key] : null; 00198 } 00199 return $this->_batchParams; 00200 }
| getData | ( | ) |
Definition at line 95 of file Abstract.php.
00096 { 00097 if (is_null($this->_data) && $this->getProfile()) { 00098 $this->_data = $this->getProfile()->getContainer()->getData(); 00099 } 00100 return $this->_data; 00101 }
| getGridFields | ( | $ | grid | ) |
| getPosition | ( | ) |
| getProfile | ( | ) |
| getVar | ( | $ | key, | |
| $ | default = null | |||
| ) |
Definition at line 50 of file Abstract.php.
00051 { 00052 if (!isset($this->_vars[$key]) || (!is_array($this->_vars[$key]) && strlen($this->_vars[$key]) == 0)) { 00053 return $default; 00054 } 00055 return $this->_vars[$key]; 00056 }
| getVars | ( | ) |
| setAction | ( | Mage_Dataflow_Model_Convert_Action_Interface $ | action | ) |
| setBatchParams | ( | $ | data | ) |
Definition at line 186 of file Abstract.php.
00187 { 00188 if (is_array($data)) { 00189 $this->_batchParams = $data; 00190 } 00191 return $this; 00192 }
| setData | ( | $ | data | ) |
Definition at line 103 of file Abstract.php.
00104 { 00105 if ($this->getProfile()) { 00106 $this->getProfile()->getContainer()->setData($data); 00107 } 00108 $this->_data = $data; 00109 return $this; 00110 }
| setPosition | ( | $ | position | ) |
| setProfile | ( | Mage_Dataflow_Model_Convert_Profile_Interface $ | profile | ) |
| setVar | ( | $ | key, | |
| $ | value = null | |||
| ) |
Definition at line 63 of file Abstract.php.
00064 { 00065 if (is_array($key) && is_null($value)) { 00066 $this->_vars = $key; 00067 } else { 00068 $this->_vars[$key] = $value; 00069 } 00070 return $this; 00071 }
| validateDataArray | ( | $ | data = null |
) |
Definition at line 123 of file Abstract.php.
00124 { 00125 if (is_null($data)) { 00126 $data = $this->getData(); 00127 } 00128 if (!is_array($data)) { 00129 $this->addException("Invalid data type, expecting array.", Mage_Dataflow_Model_Convert_Exception::FATAL); 00130 } 00131 return true; 00132 }
| validateDataGrid | ( | $ | data = null |
) |
Definition at line 134 of file Abstract.php.
00135 { 00136 if (is_null($data)) { 00137 $data = $this->getData(); 00138 } 00139 if (!is_array($data) || !is_array(current($data))) { 00140 if (count($data)==0) { 00141 return true; 00142 } 00143 $this->addException("Invalid data type, expecting 2D grid array.", Mage_Dataflow_Model_Convert_Exception::FATAL); 00144 } 00145 return true; 00146 }
| validateDataString | ( | $ | data = null |
) |
Definition at line 112 of file Abstract.php.
00113 { 00114 if (is_null($data)) { 00115 $data = $this->getData(); 00116 } 00117 if (!is_string($data)) { 00118 $this->addException("Invalid data type, expecting string.", Mage_Dataflow_Model_Convert_Exception::FATAL); 00119 } 00120 return true; 00121 }
$_action [protected] |
Definition at line 44 of file Abstract.php.
$_batchParams = array() [protected] |
Definition at line 38 of file Abstract.php.
$_data [protected] |
Definition at line 46 of file Abstract.php.
$_position [protected] |
Definition at line 48 of file Abstract.php.
$_profile [protected] |
Definition at line 42 of file Abstract.php.
$_vars [protected] |
Definition at line 40 of file Abstract.php.
1.5.8