1 | <?php |
||
4 | abstract class WebsiteAbstract implements WebsiteInterface |
||
5 | { |
||
6 | |||
7 | /** |
||
8 | * @var int |
||
9 | */ |
||
10 | public $id; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | public $title; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | public $route; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | public $route_name; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | public $via = array(); |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | public $content_file; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | public $middleware; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | public $controller; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | public $template; |
||
51 | |||
52 | /** |
||
53 | * @var string |
||
54 | */ |
||
55 | public $dom_id; |
||
56 | |||
57 | /** |
||
58 | * @var mixed |
||
59 | */ |
||
60 | public $is_active; |
||
61 | |||
62 | /** |
||
63 | * @var array |
||
64 | */ |
||
65 | public $javascripts = array(); |
||
66 | |||
67 | /** |
||
68 | * @var array |
||
69 | */ |
||
70 | public $stylesheets = array(); |
||
71 | |||
72 | |||
73 | /** |
||
74 | * Gets the page ID. |
||
75 | * |
||
76 | * @return int |
||
77 | */ |
||
78 | 5 | public function getId() |
|
82 | |||
83 | /** |
||
84 | * Gets the page title. |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | 5 | public function getTitle() |
|
92 | |||
93 | |||
94 | /** |
||
95 | * Gets the page route. |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | 5 | public function getRoute() |
|
103 | |||
104 | |||
105 | /** |
||
106 | * Gets the page route name. |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | 5 | public function getRouteName() |
|
114 | |||
115 | |||
116 | /** |
||
117 | * Gets the allowed HTTP methods to "call" this website with. |
||
118 | * |
||
119 | * @return array |
||
120 | */ |
||
121 | public function getVia() |
||
122 | { |
||
123 | return $this->via; |
||
124 | } |
||
125 | |||
126 | |||
127 | /** |
||
128 | * Gets the content file for this page. |
||
129 | * |
||
130 | * @return string |
||
131 | */ |
||
132 | 5 | public function getContentFile() |
|
136 | |||
137 | |||
138 | /** |
||
139 | * Gets the Controller class name for this page |
||
140 | * |
||
141 | * @return string |
||
142 | */ |
||
143 | 5 | public function getController() |
|
147 | |||
148 | |||
149 | /** |
||
150 | * Gets the middleware services names |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | public function getMiddleware() |
||
155 | { |
||
156 | return $this->middleware; |
||
157 | } |
||
158 | |||
159 | |||
160 | /** |
||
161 | * Gets the page template file. |
||
162 | * |
||
163 | * @return string |
||
164 | */ |
||
165 | 5 | public function getTemplate() |
|
169 | |||
170 | |||
171 | /** |
||
172 | * Gets the DOM ID for this page. |
||
173 | * |
||
174 | * @return string |
||
175 | */ |
||
176 | 5 | public function getDomId() |
|
180 | |||
181 | |||
182 | /** |
||
183 | * Gets an array with custom Javascripts |
||
184 | * |
||
185 | * @return array |
||
186 | */ |
||
187 | 5 | public function getJavascripts() |
|
191 | |||
192 | |||
193 | /** |
||
194 | * Gets an array with custom Stylesheets |
||
195 | * |
||
196 | * @return array |
||
197 | */ |
||
198 | 5 | public function getStylesheets() |
|
202 | |||
203 | |||
204 | /** |
||
205 | * Checks if the page is marked 'active'. |
||
206 | * |
||
207 | * @return mixed |
||
208 | */ |
||
209 | public function isActive() |
||
213 | } |
||
214 |