Public Member Functions | |
setDataByKey ($key, $value) | |
setDataByKeyFromRegistry ($key, $registryKey) | |
ifEquals ($conditionKeys) |
Definition at line 35 of file Facade.php.
ifEquals | ( | $ | conditionKeys | ) |
Check if data values by specified keys are equal $conditionKeys can be array or arbitrary set of params (func_get_args())
array | $conditionKeys |
Definition at line 74 of file Facade.php.
00075 { 00076 if (!is_array($conditionKeys)) { 00077 $conditionKeys = func_get_args(); 00078 } 00079 00080 // evaluate conditions (equality) 00081 if (!empty($conditionKeys)) { 00082 foreach ($conditionKeys as $key) { 00083 if (!isset($this->_data[$key])) { 00084 return false; 00085 } 00086 } 00087 $lastValue = $this->_data[$key]; 00088 foreach ($conditionKeys as $key) { 00089 if ($this->_data[$key] !== $lastValue) { 00090 return false; 00091 } 00092 } 00093 } 00094 return true; 00095 }
setDataByKey | ( | $ | key, | |
$ | value | |||
) |
Just set data, like Varien_Object
This method is to be used in layout. In layout it can be understood better, than setSomeKeyBlahBlah()
string | $key | |
string | $value |
Definition at line 46 of file Facade.php.
setDataByKeyFromRegistry | ( | $ | key, | |
$ | registryKey | |||
) |
Also set data, but take the value from registry by registry key
string | $key | |
string | $registryKey |
Definition at line 57 of file Facade.php.
00058 { 00059 $registryItem = Mage::registry($registryKey); 00060 if (empty($registryItem)) { 00061 return; 00062 } 00063 $value = $registryItem->getData($key); 00064 $this->setDataByKey($key, $value); 00065 }