diff --git a/Container.php b/Container.php index 8ab950e..e2a28ef 100644 --- a/Container.php +++ b/Container.php @@ -88,6 +88,20 @@ class Container implements ContainerInterface } + /** + * @param string $id + * @return void + * @throws ReflectionException + */ + public function parse(string $id): void + { + if (isset($this->_singletons[$id])) { + return; + } + $this->make($id); + } + + /** * @param string $interface * @param string $class