You may also find it convenient to access the registry
in an object-oriented fashion by using index names as object
You must specifically construct the registry
object using the
and initialize the static instance to enable this functionality.
You must set the
before the static registry has been accessed for
the first time.
Known Issues with the ArrayObject::ARRAY_AS_PROPS Option
Some versions of PHP have proven very buggy when using the
registry with the
Example 690. Example of Object Access
// in your application bootstrap:
$registry = new Zend_Registry(array(), ArrayObject::ARRAY_AS_PROPS)
$registry->tree = 'apple';
// in a different function, elsewhere in your application:
$registry = Zend_Registry::getInstance();
echo $registry->tree; // echo's "apple"
$registry->index = $value;