Completed
Push — master ( 209cfa...3bc018 )
by Jacob
03:25
created

SiteRouter::get_direct_array()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 14

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 16
rs 9.4285
cc 1
eloc 14
nc 1
nop 0
1
<?
0 ignored issues
show
Security Best Practice introduced by
It is not recommend to use PHP's short opening tag <?, better use <?php, or <?= in case of outputting.

Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.

As a precaution to avoid these problems better use the long opening tag <?php.

Loading history...
2
3
Loader::load('router', 'Router');
4
5
class SiteRouter extends Router
6
{
7
8
	protected function get_redirect_array()
9
	{
10
		return array(
11
			(object) array(
12
				'pattern' => '@/index.(html|htm|php)$@',
13
				'replace' => '/'));
14
	}
15
16
	protected function get_direct_array()
17
	{
18
		return array(
19
			(object) array(
20
				'match' => '/',
21
				'controller' => 'HomeController'),
22
			(object) array(
23
				'match' => '/terms/',
24
				'controller' => 'TermsController'),
25
			(object) array(
26
				'match' => '/change-log/',
27
				'controller' => 'ChangelogController'),
28
			(object) array(
29
				'match' => '/contact/',
30
				'controller' => 'ContactController'));
31
	}
32
33
}