-
-
Save geggleto/86d039f6f4924b416e6fb1bd1538e269 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function get($id) | |
{ | |
if (!$this->offsetExists($id)) { | |
throw new ContainerValueNotFoundException(sprintf('Identifier "%s" is not defined.', $id)); | |
} | |
try { | |
return $this->offsetGet($id); | |
} catch (\InvalidArgumentException $exception) { | |
if ($this->exceptionThrownByContainer($exception)) { | |
throw new SlimContainerException( | |
sprintf('Container error while retrieving "%s"', $id), | |
null, | |
$exception | |
); | |
} else { | |
throw $exception; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment