1 | <?php |
||
18 | class SelectorFactory implements SelectorFactoryInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var \ReflectionClass[] |
||
22 | */ |
||
23 | private $selectorClass; |
||
24 | |||
25 | /** |
||
26 | * @var string[] |
||
27 | */ |
||
28 | private $namespaces; |
||
29 | |||
30 | /** |
||
31 | * @param string $defaultNamespace |
||
32 | */ |
||
33 | public function __construct($defaultNamespace = null) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function addSelector($selectorClass, $selectorName = null) |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function addNamespace($namespace) |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function create($selectorName, array $arguments = array()) |
||
88 | |||
89 | /** |
||
90 | * @param string $selectorName |
||
91 | * |
||
92 | * @return \ReflectionClass |
||
93 | */ |
||
94 | private function findSelector($selectorName) |
||
112 | |||
113 | /** |
||
114 | * @param string $selectorClass |
||
115 | * @param bool $strict |
||
116 | */ |
||
117 | private function validateSelectorClass($selectorClass, $strict = true) |
||
138 | |||
139 | /** |
||
140 | * @param \Exception $exception |
||
141 | * @param bool $strict |
||
142 | * |
||
143 | * @throws \Exception |
||
144 | */ |
||
145 | private function nullOrException(\Exception $exception, $strict = true) |
||
153 | } |
||
154 |