1 | <?php |
||
15 | final class Dependency implements DependencyInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var NewInstance |
||
19 | */ |
||
20 | private $newInstance; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $postConstruct; |
||
26 | |||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $isSingleton = false; |
||
31 | |||
32 | /** |
||
33 | * @var mixed |
||
34 | */ |
||
35 | private $instance; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | private $index; |
||
41 | |||
42 | /** |
||
43 | * @param NewInstance $newInstance |
||
44 | * @param \ReflectionMethod $postConstruct |
||
45 | */ |
||
46 | 71 | public function __construct(NewInstance $newInstance, \ReflectionMethod $postConstruct = null) |
|
51 | |||
52 | 4 | public function __sleep() |
|
56 | |||
57 | 1 | public function __toString() |
|
58 | { |
||
59 | 1 | return sprintf( |
|
60 | 1 | '(dependency) %s', |
|
61 | 1 | (string) $this->newInstance |
|
62 | ); |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 63 | public function register(array &$container, Bind $bind) |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 58 | public function inject(Container $container) |
|
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | 51 | public function setScope($scope) |
|
104 | |||
105 | 43 | public function weaveAspects(CompilerInterface $compiler, array $pointcuts) |
|
120 | } |
||
121 |