1 | <?php |
||
12 | class Picotainer implements ContainerInterface |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * The delegate lookup. |
||
17 | * |
||
18 | * @var ContainerInterface |
||
19 | */ |
||
20 | protected $delegateLookupContainer; |
||
21 | |||
22 | /** |
||
23 | * The array of closures defining each entry of the container. |
||
24 | * |
||
25 | * @var array<string, Closure> |
||
26 | */ |
||
27 | protected $callbacks; |
||
28 | |||
29 | /** |
||
30 | * The array of entries once they have been instantiated. |
||
31 | * |
||
32 | * @var array<string, mixed> |
||
33 | */ |
||
34 | protected $objects; |
||
35 | |||
36 | /** |
||
37 | * Instantiate the container. |
||
38 | * |
||
39 | * @param array<string, Closure> $entries Entries must be passed as an array of anonymous functions. |
||
40 | * @param ContainerInterface $delegateLookupContainer Optional delegate lookup container. |
||
41 | */ |
||
42 | public function __construct(array $entries, ContainerInterface $delegateLookupContainer = null) |
||
47 | |||
48 | /* (non-PHPdoc) |
||
49 | * @see \Interop\Container\ContainerInterface::get() |
||
50 | */ |
||
51 | public function get($identifier) |
||
62 | |||
63 | /* (non-PHPdoc) |
||
64 | * @see \Interop\Container\ContainerInterface::has() |
||
65 | */ |
||
66 | public function has($identifier) |
||
70 | } |
||
71 |