1 | <?php |
||
12 | final class Dependency implements DependencyInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var NewInstance |
||
16 | */ |
||
17 | private $newInstance; |
||
18 | |||
19 | /** |
||
20 | * @var null|string |
||
21 | */ |
||
22 | private $postConstruct; |
||
23 | |||
24 | /** |
||
25 | * @var bool |
||
26 | */ |
||
27 | private $isSingleton = false; |
||
28 | |||
29 | /** |
||
30 | * @var mixed |
||
31 | */ |
||
32 | private $instance; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | private $index; |
||
38 | |||
39 | /** |
||
40 | * @param \ReflectionMethod $postConstruct |
||
41 | */ |
||
42 | public function __construct(NewInstance $newInstance, \ReflectionMethod $postConstruct = null) |
||
47 | |||
48 | public function __sleep() |
||
52 | |||
53 | public function __toString() |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function register(array &$container, Bind $bind) |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function inject(Container $container) |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function injectWithArgs(Container $container, array $params) |
||
111 | |||
112 | /** |
||
113 | * {@inheritdoc} |
||
114 | */ |
||
115 | public function setScope($scope) |
||
121 | |||
122 | public function weaveAspects(CompilerInterface $compiler, array $pointcuts) |
||
138 | } |
||
139 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: