Zend Framework 101: Zend_Registry
Article Comments (1 total)
Thuan Nguyen, 16 March 2009
I have written a simple function to use it easier. Hope that this will help the people who feel lazy to write the code :D
/**
* Sets or gets Registry Entry
*
* @param string $name
* @param mixed $value
* @return mixed
*/
function reg($name, $value = null)
{
if (null !== $value) {
Zend_Registry::set($name, $value);
return $value;
}
return Zend_Registry::get($name);
}




