1 | <?php |
||
24 | abstract class AbstractView implements View |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * The name of view |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private $viewName; |
||
33 | |||
34 | /** |
||
35 | * List of allowed controllers |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | private $controllers = array(); |
||
40 | |||
41 | /** |
||
42 | * List of allowed actions |
||
43 | * |
||
44 | * @var array |
||
45 | */ |
||
46 | private $actions = array(); |
||
47 | |||
48 | /** |
||
49 | * List of view controls |
||
50 | * |
||
51 | * @var array |
||
52 | */ |
||
53 | private $controls = array(); |
||
54 | |||
55 | /** |
||
56 | * List of additional css files |
||
57 | * |
||
58 | * @var array |
||
59 | */ |
||
60 | private $cssFiles = array(); |
||
61 | |||
62 | /** |
||
63 | * List of additional javascript files |
||
64 | * |
||
65 | * @var array |
||
66 | */ |
||
67 | private $jsFiles = array(); |
||
68 | |||
69 | /** |
||
70 | * (non-PHPdoc) |
||
71 | * |
||
72 | * @see \Nkey\Caribu\Mvc\View\View::getOrder() |
||
73 | */ |
||
74 | abstract public function getOrder(); |
||
75 | |||
76 | /** |
||
77 | * (non-PHPdoc) |
||
78 | * |
||
79 | * @see \Nkey\Caribu\Mvc\View\View::render() |
||
80 | */ |
||
81 | abstract public function render(Response &$response, Request $request, $parameters = array()); |
||
82 | |||
83 | /** |
||
84 | * Retrieve the settings from view |
||
85 | * |
||
86 | * @return \Nkey\Caribu\Mvc\View\View |
||
87 | */ |
||
88 | 29 | final public function getViewSettings() |
|
114 | |||
115 | /** |
||
116 | * (non-PHPdoc) |
||
117 | * |
||
118 | * @see \Nkey\Caribu\Mvc\View\View::matchController() |
||
119 | */ |
||
120 | 20 | final public function matchController($controller) |
|
126 | |||
127 | /** |
||
128 | * (non-PHPdoc) |
||
129 | * |
||
130 | * @see \Nkey\Caribu\Mvc\View\View::matchAction() |
||
131 | */ |
||
132 | 20 | final public function matchAction($action) |
|
138 | |||
139 | /** |
||
140 | * (non-PHPdoc) |
||
141 | * |
||
142 | * @see \Nkey\Caribu\Mvc\View\View::matchBoth() |
||
143 | */ |
||
144 | 20 | final public function matchBoth($controller, $action) |
|
148 | |||
149 | /** |
||
150 | * Get name of view |
||
151 | * |
||
152 | * @return string The name of view |
||
153 | */ |
||
154 | 29 | final public function getViewSimpleName() |
|
158 | |||
159 | /** |
||
160 | * (non-PHPdoc) |
||
161 | * |
||
162 | * @see \Nkey\Caribu\Mvc\View\View::registerControl() |
||
163 | */ |
||
164 | 4 | final public function registerControl($controlClass, $controlIdentifier) |
|
168 | |||
169 | /** |
||
170 | * (non-PHPdoc) |
||
171 | * |
||
172 | * @see \Nkey\Caribu\Mvc\View\View::createControl() |
||
173 | */ |
||
174 | 1 | final public function createControl($controlIdentifier) |
|
179 | |||
180 | /** |
||
181 | * (non-PHPdoc) |
||
182 | * |
||
183 | * @see \Nkey\Caribu\Mvc\View\View::hasControl() |
||
184 | */ |
||
185 | 2 | final public function hasControl($controlIdentifier) |
|
189 | |||
190 | /** |
||
191 | * (non-PHPdoc) |
||
192 | * |
||
193 | * @see \Nkey\Caribu\Mvc\View\View::setCssFiles() |
||
194 | */ |
||
195 | 20 | final public function setCssFiles(array $files) |
|
200 | |||
201 | /** |
||
202 | * (non-PHPdoc) |
||
203 | * |
||
204 | * @see \Nkey\Caribu\Mvc\View\View::setJsFiles() |
||
205 | */ |
||
206 | 20 | final public function setJsFiles(array $files) |
|
211 | |||
212 | /** |
||
213 | * Retrieve all js files |
||
214 | * |
||
215 | * @return array |
||
216 | */ |
||
217 | final protected function getJsFiles() |
||
221 | |||
222 | /** |
||
223 | * Retrieve all css files |
||
224 | * |
||
225 | * @return array |
||
226 | */ |
||
227 | final protected function getCssFiles() |
||
231 | } |
||
232 |