resolvedEntries[self::class] = $this; } /** * @template T of object * @param class-string|string $name Container entry name. * @return ($name is class-string ? T : mixed) */ public function get($name) { try { return parent::get($name); } catch (\DI\NotFoundException $e) { throw new NotFoundException($e->getMessage(), $e->getCode(), $e); } } /** * @template T of object * @param class-string|string $name Container entry name. * @return ($name is class-string ? T : mixed) */ public function make($name, array $parameters = []) { try { return parent::make($name, $parameters); } catch (\DI\NotFoundException $e) { throw new NotFoundException($e->getMessage(), $e->getCode(), $e); } catch (\DI\DependencyException $e) { throw new DependencyException($e->getMessage(), $e->getCode(), $e); } } public function injectOn($instance) { try { return parent::injectOn($instance); } catch (\DI\DependencyException $e) { throw new DependencyException($e->getMessage(), $e->getCode(), $e); } } }