ClassRegistry Class Reference
Public Member Functions | |
| addObject ($key, &$object) | |
| & | getInstance () |
| & | getObject ($key) |
| isKeySet ($key) | |
| keys () | |
| removeObject ($key) | |
Public Attributes | |
| $_objects = array() | |
Detailed Description
Definition at line 39 of file class_registry.php.
Member Function Documentation
| ClassRegistry::addObject | ( | $ | key, | |
| &$ | object | |||
| ) |
Add $object to the registry, associating it with the name $key.
- Parameters:
-
string $key mixed $object
Definition at line 65 of file class_registry.php.
References getInstance(), and Inflector::underscore().
| & ClassRegistry::getInstance | ( | ) |
Return a singleton instance of the ClassRegistry.
- Returns:
- ClassRegistry instance
Definition at line 52 of file class_registry.php.
Referenced by addObject(), Controller::constructClasses(), getObject(), isKeySet(), keys(), and removeObject().
| & ClassRegistry::getObject | ( | $ | key | ) |
Return object which corresponds to given key.
- Parameters:
-
string $key
- Returns:
- mixed
Definition at line 111 of file class_registry.php.
References getInstance(), and Inflector::underscore().
Referenced by SessionHelper::flash(), Controller::generateFieldNames(), Bake::generateFields(), and Controller::render().
| ClassRegistry::isKeySet | ( | $ | key | ) |
Returns true if given key is present in the ClassRegistry.
- Parameters:
-
string $key Key to look for
- Returns:
- boolean Success
Definition at line 91 of file class_registry.php.
References getInstance(), and Inflector::underscore().
Referenced by Controller::render().
| ClassRegistry::keys | ( | ) |
Get all keys from the regisrty.
- Returns:
- array
Definition at line 101 of file class_registry.php.
References getInstance().
Referenced by Controller::render().
| ClassRegistry::removeObject | ( | $ | key | ) |
Remove object which corresponds to given key.
- Parameters:
-
string $key
- Returns:
- void
Definition at line 78 of file class_registry.php.
References getInstance(), and Inflector::underscore().
Member Data Documentation
| ClassRegistry::$_objects = array() |
Definition at line 46 of file class_registry.php.
The documentation for this class was generated from the following file:
- 1.1.x.x/cake/libs/class_registry.php