1 | <?php |
||
24 | class ExtensionRegistry extends ObjectRegistry |
||
25 | { |
||
26 | |||
27 | use EventDispatcherTrait; |
||
28 | |||
29 | /** |
||
30 | * The Service that this collection was initialized with. |
||
31 | * |
||
32 | * @var Service |
||
33 | */ |
||
34 | protected $_service = null; |
||
35 | |||
36 | /** |
||
37 | * Constructor. |
||
38 | * |
||
39 | * @param Service $service Service instance. |
||
40 | */ |
||
41 | public function __construct(Service $service = null) |
||
47 | /** |
||
48 | * Should resolve the classname for a given object type. |
||
49 | * |
||
50 | * @param string $class The class to resolve. |
||
51 | * @return string|false The resolved name or false for failure. |
||
52 | */ |
||
53 | protected function _resolveClassName($class) |
||
62 | |||
63 | /** |
||
64 | * Throw an exception when the requested object name is missing. |
||
65 | * |
||
66 | * @param string $class The class that is missing. |
||
67 | * @param string $plugin The plugin $class is missing from. |
||
68 | * @return void |
||
69 | * @throws \Exception |
||
70 | */ |
||
71 | protected function _throwMissingClassError($class, $plugin) |
||
78 | |||
79 | /** |
||
80 | * Create an instance of a given classname. |
||
81 | * |
||
82 | * This method should construct and do any other initialization logic |
||
83 | * required. |
||
84 | * |
||
85 | * @param string $class The class to build. |
||
86 | * @param string $alias The alias of the object. |
||
87 | * @param array $config The Configuration settings for construction |
||
88 | * @return mixed |
||
89 | */ |
||
90 | protected function _create($class, $alias, $config) |
||
100 | } |
||
101 |
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: