Filepath: phork/php/core/CoreRegistry.class.php and phork/php/app/AppRegistry.class.php

The CoreRegistry object is used to store objects that should be accessible throughout the application. It's a replacement for global variables. There are a few reserved names that can't be used in the registry because they're used by the system. They are Error, Database, Cache, Controller, and Url.

The registry class is a singleton meaning there can only be one instance of it at a time.


AppRegistry::register('MyObject', new MyObject());
$objMyObject = AppRegistry::get('MyObject');