You are here

function xautoload_ServiceRegistry::get in X Autoload 7.2

1 call to xautoload_ServiceRegistry::get()
xautoload_ServiceRegistry::__get in lib/ServiceRegistry.php

File

lib/ServiceRegistry.php, line 9

Class

xautoload_ServiceRegistry

Code

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];
}