Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Extending the Registry

The static registry is an instance of the class Zend_Registry. If you want to add functionality to the registry, you should create a class that extends Zend_Registry and specify this class to instantiate for the singleton in the static registry. Use the static method setClassName() to specify the class.


The class must be a subclass of Zend_Registry.

Example 693. Example of Specifying the Singleton Registry's Class Name



The registry throws a Zend_Exception if you attempt to set the classname after the registry has been accessed for the first time. It is therefore recommended that you specify the class name for your static registry in your application bootstrap.

Zend Framework