1 | <?php |
||
9 | final class DependencyProvider implements DependencyInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | public $context; |
||
15 | |||
16 | /** |
||
17 | * Provider dependency |
||
18 | * |
||
19 | * @var Dependency |
||
20 | */ |
||
21 | private $dependency; |
||
22 | |||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | private $isSingleton = false; |
||
27 | |||
28 | /** |
||
29 | * @var mixed |
||
30 | */ |
||
31 | private $instance; |
||
32 | |||
33 | 47 | public function __construct(Dependency $dependency, $context = null) |
|
38 | |||
39 | 2 | public function __sleep() |
|
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | 47 | public function register(array &$container, Bind $bind) |
|
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 13 | public function inject(Container $container) |
|
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | 40 | public function setScope($scope) |
|
78 | |||
79 | 3 | public function setContext(SetContextInterface $provider) |
|
83 | } |
||
84 |