1 | <?php |
||
9 | class Builder implements BuilderInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var Container |
||
13 | */ |
||
14 | private $internalContainer; |
||
15 | |||
16 | /** |
||
17 | * @var ContainerInterface |
||
18 | */ |
||
19 | private $externalContainer; |
||
20 | |||
21 | /** |
||
22 | * @param Container $internalContainer |
||
23 | * @param ContainerInterface|null $externalContainer |
||
24 | */ |
||
25 | 12 | public function __construct( |
|
32 | |||
33 | /** |
||
34 | * @param string $id The unique identifier for the parameter or object |
||
35 | * @param mixed $value The value of the parameter or a closure to define an object |
||
36 | */ |
||
37 | 1 | public function defineSingleton($id, $value) |
|
41 | |||
42 | /** |
||
43 | * @param string $id The unique identifier for the parameter or object |
||
44 | * @param callable $callable A service definition to be used as a factory |
||
45 | */ |
||
46 | 1 | public function defineFactory($id, $callable) |
|
50 | |||
51 | /** |
||
52 | * @param string $id |
||
53 | * |
||
54 | * @return bool |
||
55 | */ |
||
56 | 3 | public function isDefined($id) |
|
61 | |||
62 | /** |
||
63 | * @param string $id |
||
64 | * |
||
65 | * @return mixed |
||
66 | * |
||
67 | * @throws ServiceNotFoundException if the service does not exist |
||
68 | */ |
||
69 | 4 | public function build($id) |
|
81 | |||
82 | /** |
||
83 | * @param string $id |
||
84 | */ |
||
85 | 1 | public function dispose($id) |
|
89 | } |
||
90 |