// create a new instance of the registry $registry = Zend_Registry::getInstance(); // set some variables $registry->foo = 'bar'; $registry->baz = 'qux'; // remove the instance of the registry Zend_Registry::_unsetInstance();
// check if an instance of the registry exists if (Zend_Registry::isRegistered('my_registry')) { // get the instance of the registry $registry = Zend_Registry::getInstance('my_registry'); // remove the instance of the registry Zend_Registry::_unsetInstance('my_registry'); }This method is part of the Zend Framework's Core package library.