| 1 | <?php |
||
| 12 | class LaravelContainer implements ContainerInterface |
||
| 13 | { |
||
| 14 | /** @var Container */ |
||
| 15 | protected $container; |
||
| 16 | |||
| 17 | public function __construct(Container $container) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Finds an entry of the container by its identifier and returns it. |
||
| 24 | * |
||
| 25 | * @param string $id Identifier of the entry to look for. |
||
| 26 | * |
||
| 27 | * @throws NotFoundExceptionInterface No entry was found for **this** identifier. |
||
| 28 | * @throws ContainerExceptionInterface Error while retrieving the entry. |
||
| 29 | * |
||
| 30 | * @return mixed Entry. |
||
| 31 | */ |
||
| 32 | public function get($id) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Returns true if the container can return an entry for the given identifier. |
||
| 42 | * Returns false otherwise. |
||
| 43 | * |
||
| 44 | * `has($id)` returning true does not mean that `get($id)` will not throw an exception. |
||
| 45 | * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. |
||
| 46 | * |
||
| 47 | * @param string $id Identifier of the entry to look for. |
||
| 48 | * |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | public function has($id) |
||
| 64 | } |
||
| 65 |