Zend_Registry is a wrapper around a variable that stores an array. static
Transforming a static variable from Wikipedia
In computer programming, a static variable is a variable that has been distributed statically, whose life time extends to the entire program.
Similarly, variables stored inside Zend_Registry apply to the entire program run.
A simple class of my registry
class My_Registry
{
static $storage;
public static function set($key,$value)
{
self::$storage[$key] = $value;
}
public static function get($key)
{
return self::$storage[$key];
}
}
source
share