class xautoload_ServiceRegistry in X Autoload 7.2
Hierarchy
- class \xautoload_ServiceRegistry
Expanded class hierarchy of xautoload_ServiceRegistry
File
- lib/
ServiceRegistry.php, line 4
View source
class xautoload_ServiceRegistry {
protected $factory;
protected $cache = array();
function get($key) {
if (!isset($this->cache[$key])) {
$this->cache[$key] = $this->factory
->{$key}($this);
if (!isset($this->cache[$key])) {
$this->cache[$key] = FALSE;
}
}
return $this->cache[$key];
}
function reset($key) {
$this->cache[$key] = NULL;
}
function __get($key) {
return $this
->get($key);
}
function __construct($factory) {
$this->factory = $factory;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
xautoload_ServiceRegistry:: |
protected | property | ||
xautoload_ServiceRegistry:: |
protected | property | ||
xautoload_ServiceRegistry:: |
function | |||
xautoload_ServiceRegistry:: |
function | |||
xautoload_ServiceRegistry:: |
function | |||
xautoload_ServiceRegistry:: |
function |