1 | <?php |
||
13 | class ResolverFactory extends AbstractFactory |
||
14 | { |
||
15 | /** |
||
16 | * @var string $resolverPrefix |
||
17 | */ |
||
18 | private $resolverPrefix = ''; |
||
19 | |||
20 | /** |
||
21 | * @var string $resolverSuffix |
||
22 | */ |
||
23 | private $resolverSuffix = ''; |
||
24 | |||
25 | /** |
||
26 | * @var array $resolverCapitals |
||
27 | */ |
||
28 | private $resolverCapitals = null; |
||
29 | |||
30 | /** |
||
31 | * @var array $resolverReplacements |
||
32 | */ |
||
33 | private $resolverReplacements = null; |
||
34 | |||
35 | /** |
||
36 | * @param string $prefix The resolver prefix string. |
||
37 | * @throws InvalidArgumentException If the prefix argument is not a string. |
||
38 | * @return ResolverFactory Chainable |
||
39 | */ |
||
40 | public function setResolverPrefix($prefix) |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | public function resolverPrefix() |
||
58 | |||
59 | /** |
||
60 | * @param string $suffix The resolver suffix string. |
||
61 | * @throws InvalidArgumentException If the suffix argument is not a string. |
||
62 | * @return ResolverFactory Chainable |
||
63 | */ |
||
64 | public function setResolverSuffix($suffix) |
||
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | public function resolverSuffix() |
||
82 | |||
83 | /** |
||
84 | * @param array $capitals The array of letter to "calitalize-next" (uppercase next letter in the string). |
||
85 | * @return ResolverFactory Chainable |
||
86 | */ |
||
87 | public function setResolverCapitals(array $capitals) |
||
92 | |||
93 | /** |
||
94 | * @return array |
||
95 | */ |
||
96 | public function resolverCapitals() |
||
109 | |||
110 | /** |
||
111 | * @param array $replacements The array (key=>value) of replacements. |
||
112 | * @return ResolverFactory Chainable |
||
113 | */ |
||
114 | public function setResolverReplacements(array $replacements) |
||
119 | |||
120 | /** |
||
121 | * @return array |
||
122 | */ |
||
123 | public function resolverReplacements() |
||
134 | |||
135 | /** |
||
136 | * Resolve the class name from the requested type. |
||
137 | * |
||
138 | * @param string $type The "type" of object to resolve (the object ident). |
||
139 | * @throws InvalidArgumentException If the type parameter is not a string. |
||
140 | * @return string |
||
141 | */ |
||
142 | public function resolve($type) |
||
173 | |||
174 | /** |
||
175 | * @param string $type The "type" of object to resolve (the object ident). |
||
176 | * @throws InvalidArgumentException If the type parameter is not a string. |
||
177 | * @return boolean |
||
178 | */ |
||
179 | public function isResolvable($type) |
||
190 | } |
||
191 |