WebsiteAbstract::getRoute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace Germania\Websites;
3
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()
79
    {
80 5
        return $this->id;
81
    }
82
83
    /**
84
     * Gets the page title.
85
     *
86
     * @return string
87
     */
88 5
    public function getTitle()
89
    {
90 5
        return $this->title;
91
    }
92
93
94
    /**
95
     * Gets the page route.
96
     *
97
     * @return string
98
     */
99 5
    public function getRoute()
100
    {
101 5
        return $this->route;
102
    }
103
104
105
    /**
106
     * Gets the page route name.
107
     *
108
     * @return string
109
     */
110 5
    public function getRouteName()
111
    {
112 5
        return $this->route_name;
113
    }
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()
133
    {
134 5
        return $this->content_file;
135
    }
136
137
138
    /**
139
     * Gets the Controller class name for this page
140
     *
141
     * @return string
142
     */
143 5
    public function getController()
144
    {
145 5
        return $this->controller;
146
    }
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()
166
    {
167 5
        return $this->template;
168
    }
169
170
171
    /**
172
     * Gets the DOM ID for this page.
173
     *
174
     * @return string
175
     */
176 5
    public function getDomId()
177
    {
178 5
        return $this->dom_id;
179
    }
180
181
182
    /**
183
     * Gets an array with custom Javascripts
184
     *
185
     * @return array
186
     */
187 5
    public function getJavascripts()
188
    {
189 5
        return $this->javascripts;
190
    }
191
192
193
    /**
194
     * Gets an array with custom Stylesheets
195
     *
196
     * @return array
197
     */
198 5
    public function getStylesheets()
199
    {
200 5
        return $this->stylesheets;
201
    }
202
203
204
    /**
205
     * Checks if the page is marked 'active'.
206
     *
207
     * @return mixed
208
     */
209
    public function isActive()
210
    {
211
        return $this->is_active;
212
    }
213
}
214