You are here

function ServiceContainer::get in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 src/DIC/ServiceContainer.php \Drupal\xautoload\DIC\ServiceContainer::get()

Parameters

string $key:

Return value

mixed

File

lib/DIC/ServiceContainer.php, line 22

Class

ServiceContainer

Namespace

Drupal\xautoload\DIC

Code

function get($key) {
  return isset($this->services[$key]) ? $this->services[$key] : ($this->services[$key] = $this->factory
    ->{$key}($this) ?: FALSE);
}