Public Member Functions | |
getVar ($key, $default=null) | |
getVars () | |
setVar ($key, $value=null) | |
getProfile () | |
setProfile (Varien_Convert_Profile_Abstract $profile) | |
getData () | |
setData ($data) | |
validateDataString ($data=null) | |
validateDataArray ($data=null) | |
validateDataGrid ($data=null) | |
getGridFields ($grid) | |
addException ($error, $level=null) | |
getPosition () | |
setPosition ($position) | |
Protected Attributes | |
$_vars | |
$_profile | |
$_data | |
$_position |
Definition at line 35 of file Abstract.php.
addException | ( | $ | error, | |
$ | level = null | |||
) |
Definition at line 142 of file Abstract.php.
00143 { 00144 $e = new Varien_Convert_Exception($error); 00145 $e->setLevel(!is_null($level) ? $level : Varien_Convert_Exception::NOTICE); 00146 $e->setContainer($this); 00147 $e->setPosition($this->getPosition()); 00148 00149 if ($this->getProfile()) { 00150 $this->getProfile()->addException($e); 00151 } 00152 00153 return $e; 00154 }
getData | ( | ) |
Definition at line 76 of file Abstract.php.
00077 { 00078 if (is_null($this->_data) && $this->getProfile()) { 00079 $this->_data = $this->getProfile()->getContainer()->getData(); 00080 } 00081 return $this->_data; 00082 }
getGridFields | ( | $ | grid | ) |
getPosition | ( | ) |
getProfile | ( | ) |
getVar | ( | $ | key, | |
$ | default = null | |||
) |
Definition at line 42 of file Abstract.php.
00043 { 00044 if (!isset($this->_vars[$key])) { 00045 return $default; 00046 } 00047 return $this->_vars[$key]; 00048 }
getVars | ( | ) |
setData | ( | $ | data | ) |
Definition at line 84 of file Abstract.php.
00085 { 00086 if ($this->getProfile()) { 00087 $this->getProfile()->getContainer()->setData($data); 00088 } 00089 $this->_data = $data; 00090 return $this; 00091 }
setPosition | ( | $ | position | ) |
setProfile | ( | Varien_Convert_Profile_Abstract $ | profile | ) |
setVar | ( | $ | key, | |
$ | value = null | |||
) |
Definition at line 55 of file Abstract.php.
00056 { 00057 if (is_array($key) && is_null($value)) { 00058 $this->_vars = $key; 00059 } else { 00060 $this->_vars[$key] = $value; 00061 } 00062 return $this; 00063 }
validateDataArray | ( | $ | data = null |
) |
Definition at line 104 of file Abstract.php.
00105 { 00106 if (is_null($data)) { 00107 $data = $this->getData(); 00108 } 00109 if (!is_array($data)) { 00110 $this->addException("Invalid data type, expecting array.", Varien_Convert_Exception::FATAL); 00111 } 00112 return true; 00113 }
validateDataGrid | ( | $ | data = null |
) |
Definition at line 115 of file Abstract.php.
00116 { 00117 if (is_null($data)) { 00118 $data = $this->getData(); 00119 } 00120 if (!is_array($data) || !is_array(current($data))) { 00121 if (count($data)==0) { 00122 return true; 00123 } 00124 $this->addException("Invalid data type, expecting 2D grid array.", Varien_Convert_Exception::FATAL); 00125 } 00126 return true; 00127 }
validateDataString | ( | $ | data = null |
) |
Definition at line 93 of file Abstract.php.
00094 { 00095 if (is_null($data)) { 00096 $data = $this->getData(); 00097 } 00098 if (!is_string($data)) { 00099 $this->addException("Invalid data type, expecting string.", Varien_Convert_Exception::FATAL); 00100 } 00101 return true; 00102 }
$_data [protected] |
Definition at line 39 of file Abstract.php.
$_position [protected] |
Definition at line 40 of file Abstract.php.
$_profile [protected] |
Definition at line 38 of file Abstract.php.
$_vars [protected] |
Definition at line 37 of file Abstract.php.