| 1 | <?php  | 
            ||
| 10 | class Container implements ContainerInterface  | 
            ||
| 11 | { | 
            ||
| 12 | private $config = [];  | 
            ||
| 13 | |||
| 14 | public function __construct($config)  | 
            ||
| 18 | |||
| 19 | /**  | 
            ||
| 20 | * Finds an entry of the container by its identifier and returns it.  | 
            ||
| 21 | *  | 
            ||
| 22 | * @param string $id Identifier of the entry to look for.  | 
            ||
| 23 | * @throws NotFoundExceptionInterface No entry was found for **this** identifier.  | 
            ||
| 24 | * @throws ContainerExceptionInterface Error while retrieving the entry.  | 
            ||
| 25 | * @return mixed Entry.  | 
            ||
| 26 | */  | 
            ||
| 27 | public function get($id)  | 
            ||
| 35 | |||
| 36 | /**  | 
            ||
| 37 | * Returns true if the container can return an entry for the given identifier.  | 
            ||
| 38 | * Returns false otherwise.  | 
            ||
| 39 | * `has($id)` returning true does not mean that `get($id)` will not throw an exception.  | 
            ||
| 40 | * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.  | 
            ||
| 41 | *  | 
            ||
| 42 | * @param string $id Identifier of the entry to look for.  | 
            ||
| 43 | * @return bool  | 
            ||
| 44 | */  | 
            ||
| 45 | public function has($id)  | 
            ||
| 49 | |||
| 50 | /**  | 
            ||
| 51 | * @param $id  | 
            ||
| 52 | * @param $args  | 
            ||
| 53 | * @return mixed  | 
            ||
| 54 | */  | 
            ||
| 55 | public function getClosure($id, $args = null)  | 
            ||
| 65 | }  | 
            ||
| 66 |