1 | <?php |
||
5 | class Controller |
||
6 | { |
||
7 | /** |
||
8 | * @var Map |
||
9 | */ |
||
10 | protected $map; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $serviceId; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $namespace; |
||
21 | |||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | protected $injectContainer = false; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $injectionKeys = array(); |
||
31 | |||
32 | /** |
||
33 | * @var Method[] |
||
34 | */ |
||
35 | protected $methods = array(); |
||
36 | |||
37 | /** |
||
38 | * @param array $controllerInfo |
||
39 | */ |
||
40 | public function __construct(array $controllerInfo = null) |
||
52 | |||
53 | /** |
||
54 | * @param Map $map |
||
55 | * @param bool $stopPropagation |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setMap(Map $map, $stopPropagation = false) |
||
67 | |||
68 | /** |
||
69 | * @return Map |
||
70 | */ |
||
71 | public function end() |
||
75 | |||
76 | /** |
||
77 | * @param $serviceId |
||
78 | * @return $this |
||
79 | */ |
||
80 | public function setServiceId($serviceId) |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getServiceId() |
||
94 | |||
95 | /** |
||
96 | * @param string $namespace |
||
97 | * @return $this |
||
98 | */ |
||
99 | public function setNamespace($namespace) |
||
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getNamespace() |
||
113 | |||
114 | /** |
||
115 | * @param boolean $injectContainer |
||
116 | * @return $this |
||
117 | */ |
||
118 | public function setInjectContainer($injectContainer) |
||
124 | |||
125 | /** |
||
126 | * @return boolean |
||
127 | */ |
||
128 | public function isInjectContainer() |
||
132 | |||
133 | /** |
||
134 | * @param array $injectionKeys |
||
135 | * @return $this |
||
136 | */ |
||
137 | public function setInjectionKeys($injectionKeys) |
||
143 | |||
144 | /** |
||
145 | * @return array |
||
146 | */ |
||
147 | public function getInjectionKeys() |
||
151 | |||
152 | /** |
||
153 | * @return bool |
||
154 | */ |
||
155 | public function hasInjectionKeys() |
||
159 | |||
160 | /** |
||
161 | * @param Method $method |
||
162 | * @param bool $stopPropagation |
||
163 | * @return Method |
||
164 | */ |
||
165 | public function addMethod(Method $method = null, $stopPropagation = false) |
||
179 | |||
180 | /** |
||
181 | * @return Method[] |
||
182 | */ |
||
183 | public function getMethods() |
||
187 | |||
188 | /** |
||
189 | * @return bool |
||
190 | */ |
||
191 | public function hasMethods() |
||
195 | |||
196 | /** |
||
197 | * @return array |
||
198 | */ |
||
199 | public function __toArray() |
||
213 | } |
||
214 |