diff --git a/Container.php b/Container.php index 7260f62..ae27206 100644 --- a/Container.php +++ b/Container.php @@ -77,10 +77,14 @@ class Container /** * @param $name - * @return mixed + * @return mixed|object|ReflectionClass + * @throws ReflectionException */ public function get($name) { + if (!isset($this->container[$name])) { + return $this->createObject($name); + } return $this->container[$name]; }