@@ -5,13 +5,13 @@ |
||
5 | 5 | class Error303Controller extends PageController |
6 | 6 | { |
7 | 7 | |
8 | - public function __construct($uri) |
|
9 | - { |
|
10 | - Header::redirect($uri, 303); |
|
11 | - exit; |
|
12 | - } |
|
8 | + public function __construct($uri) |
|
9 | + { |
|
10 | + Header::redirect($uri, 303); |
|
11 | + exit; |
|
12 | + } |
|
13 | 13 | |
14 | - protected function set_head_data() {} |
|
15 | - protected function set_body_data() {} |
|
14 | + protected function set_head_data() {} |
|
15 | + protected function set_body_data() {} |
|
16 | 16 | |
17 | 17 | } |
@@ -2,16 +2,20 @@ |
||
2 | 2 | |
3 | 3 | Loader::load('controller', '/PageController'); |
4 | 4 | |
5 | -class Error303Controller extends PageController |
|
6 | -{ |
|
5 | +class Error303Controller extends PageController |
|
6 | +{ |
|
7 | 7 | |
8 | - public function __construct($uri) |
|
9 | - { |
|
8 | + public function __construct($uri) |
|
9 | + { |
|
10 | 10 | Header::redirect($uri, 303); |
11 | 11 | exit; |
12 | 12 | } |
13 | 13 | |
14 | - protected function set_head_data() {} |
|
15 | - protected function set_body_data() {} |
|
14 | + protected function set_head_data() |
|
15 | + { |
|
16 | +} |
|
17 | + protected function set_body_data() |
|
18 | + { |
|
19 | +} |
|
16 | 20 | |
17 | 21 | } |
@@ -5,58 +5,58 @@ |
||
5 | 5 | class Error404Controller extends PageController |
6 | 6 | { |
7 | 7 | |
8 | - protected function set_head_data() |
|
9 | - { |
|
10 | - $this->set_header_method('send404'); |
|
11 | - $this->add_css('normalize'); |
|
12 | - $this->add_css('404'); |
|
8 | + protected function set_head_data() |
|
9 | + { |
|
10 | + $this->set_header_method('send404'); |
|
11 | + $this->add_css('normalize'); |
|
12 | + $this->add_css('404'); |
|
13 | 13 | |
14 | - $this->set_title("Jacob Emerick's 404 Page"); |
|
15 | - $this->set_head('description', 'Global 404 page for sites under jacobemerick.com. Page not found!'); |
|
16 | - $this->set_head('keywords', ''); |
|
17 | - } |
|
14 | + $this->set_title("Jacob Emerick's 404 Page"); |
|
15 | + $this->set_head('description', 'Global 404 page for sites under jacobemerick.com. Page not found!'); |
|
16 | + $this->set_head('keywords', ''); |
|
17 | + } |
|
18 | 18 | |
19 | - protected function set_body_data() |
|
20 | - { |
|
21 | - $this->set_body('site_list', $this->get_sites()); |
|
19 | + protected function set_body_data() |
|
20 | + { |
|
21 | + $this->set_body('site_list', $this->get_sites()); |
|
22 | 22 | |
23 | - $this->set_body_view('/404'); |
|
24 | - } |
|
23 | + $this->set_body_view('/404'); |
|
24 | + } |
|
25 | 25 | |
26 | - private function get_sites() |
|
27 | - { |
|
26 | + private function get_sites() |
|
27 | + { |
|
28 | 28 | return [ |
29 | - [ |
|
29 | + [ |
|
30 | 30 | 'url' => 'https://home.jacobemerick.com/', |
31 | 31 | 'title' => "Jacob Emerick's Home", |
32 | 32 | 'name' => 'Home' |
33 | - ], |
|
34 | - [ |
|
33 | + ], |
|
34 | + [ |
|
35 | 35 | 'url' => 'https://blog.jacobemerick.com/', |
36 | 36 | 'title' => "Jacob Emerick's Blog", |
37 | 37 | 'name' => 'Blog' |
38 | - ], |
|
39 | - [ |
|
38 | + ], |
|
39 | + [ |
|
40 | 40 | 'url' => 'https://lifestream.jacobemerick.com/', |
41 | 41 | 'title' => "Jacob Emerick's Lifestream", |
42 | 42 | 'name' => 'Lifestream' |
43 | - ], |
|
44 | - [ |
|
43 | + ], |
|
44 | + [ |
|
45 | 45 | 'url' => 'https://map.jacobemerick.com/', |
46 | 46 | 'title' => "Jacob Emerick's Hiking Map", |
47 | 47 | 'name' => 'Map' |
48 | - ], |
|
49 | - [ |
|
48 | + ], |
|
49 | + [ |
|
50 | 50 | 'url' => 'https://portfolio.jacobemerick.com/', |
51 | 51 | 'title' => "Jacob Emerick's Portfolio", |
52 | 52 | 'name' => 'Portfolio', |
53 | - ], |
|
54 | - [ |
|
53 | + ], |
|
54 | + [ |
|
55 | 55 | 'url' => 'https://www.waterfallsofthekeweenaw.com/', |
56 | 56 | 'title' => 'Waterfalls of the Keweenaw', |
57 | 57 | 'name' => 'Waterfalls' |
58 | - ] |
|
59 | - ]; |
|
60 | - } |
|
58 | + ] |
|
59 | + ]; |
|
60 | + } |
|
61 | 61 | |
62 | 62 | } |
@@ -2,11 +2,11 @@ discard block |
||
2 | 2 | |
3 | 3 | Loader::load('controller', '/PageController'); |
4 | 4 | |
5 | -class Error404Controller extends PageController |
|
6 | -{ |
|
5 | +class Error404Controller extends PageController |
|
6 | +{ |
|
7 | 7 | |
8 | - protected function set_head_data() |
|
9 | - { |
|
8 | + protected function set_head_data() |
|
9 | + { |
|
10 | 10 | $this->set_header_method('send404'); |
11 | 11 | $this->add_css('normalize'); |
12 | 12 | $this->add_css('404'); |
@@ -16,15 +16,15 @@ discard block |
||
16 | 16 | $this->set_head('keywords', ''); |
17 | 17 | } |
18 | 18 | |
19 | - protected function set_body_data() |
|
20 | - { |
|
19 | + protected function set_body_data() |
|
20 | + { |
|
21 | 21 | $this->set_body('site_list', $this->get_sites()); |
22 | 22 | |
23 | 23 | $this->set_body_view('/404'); |
24 | 24 | } |
25 | 25 | |
26 | - private function get_sites() |
|
27 | - { |
|
26 | + private function get_sites() |
|
27 | + { |
|
28 | 28 | return [ |
29 | 29 | [ |
30 | 30 | 'url' => 'https://home.jacobemerick.com/', |
@@ -5,9 +5,9 @@ |
||
5 | 5 | class URLSafeContent extends Content |
6 | 6 | { |
7 | 7 | |
8 | - protected function execute() |
|
9 | - { |
|
10 | - $this->content = strtolower(str_replace(' ', '-', $this->content)); |
|
11 | - } |
|
8 | + protected function execute() |
|
9 | + { |
|
10 | + $this->content = strtolower(str_replace(' ', '-', $this->content)); |
|
11 | + } |
|
12 | 12 | |
13 | 13 | } |
14 | 14 | \ No newline at end of file |
@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | Loader::load('utility', 'Content'); |
4 | 4 | |
5 | -class URLSafeContent extends Content |
|
6 | -{ |
|
5 | +class URLSafeContent extends Content |
|
6 | +{ |
|
7 | 7 | |
8 | - protected function execute() |
|
9 | - { |
|
8 | + protected function execute() |
|
9 | + { |
|
10 | 10 | $this->content = strtolower(str_replace(' ', '-', $this->content)); |
11 | 11 | } |
12 | 12 |
@@ -3,43 +3,43 @@ |
||
3 | 3 | abstract class Content |
4 | 4 | { |
5 | 5 | |
6 | - protected $original_content; |
|
7 | - protected $content; |
|
8 | - |
|
9 | - function __construct($content) |
|
10 | - { |
|
11 | - $this->original_content = $content; |
|
12 | - $this->content = $content; |
|
13 | - } |
|
14 | - |
|
15 | - public function getOriginal() |
|
16 | - { |
|
17 | - return $this->original_content; |
|
18 | - } |
|
19 | - |
|
20 | - abstract protected function execute(); |
|
21 | - |
|
22 | - public function activate() |
|
23 | - { |
|
24 | - $args = func_get_args(); |
|
25 | - call_user_func_array(array($this, 'execute'), $args); |
|
6 | + protected $original_content; |
|
7 | + protected $content; |
|
8 | + |
|
9 | + function __construct($content) |
|
10 | + { |
|
11 | + $this->original_content = $content; |
|
12 | + $this->content = $content; |
|
13 | + } |
|
14 | + |
|
15 | + public function getOriginal() |
|
16 | + { |
|
17 | + return $this->original_content; |
|
18 | + } |
|
19 | + |
|
20 | + abstract protected function execute(); |
|
21 | + |
|
22 | + public function activate() |
|
23 | + { |
|
24 | + $args = func_get_args(); |
|
25 | + call_user_func_array(array($this, 'execute'), $args); |
|
26 | 26 | |
27 | - return $this->content; |
|
28 | - } |
|
27 | + return $this->content; |
|
28 | + } |
|
29 | 29 | |
30 | - public function check() |
|
31 | - { |
|
32 | - $args = func_get_args(); |
|
33 | - $return = call_user_func_array(array($this, 'execute'), $args); |
|
30 | + public function check() |
|
31 | + { |
|
32 | + $args = func_get_args(); |
|
33 | + $return = call_user_func_array(array($this, 'execute'), $args); |
|
34 | 34 | |
35 | - return $return; |
|
36 | - } |
|
37 | - |
|
38 | - public static function instance($class, $content) |
|
39 | - { |
|
40 | - $class_name = "{$class}Content"; |
|
41 | - Loader::load('utility', "content/{$class_name}"); |
|
42 | - return new $class_name($content); |
|
43 | - } |
|
35 | + return $return; |
|
36 | + } |
|
37 | + |
|
38 | + public static function instance($class, $content) |
|
39 | + { |
|
40 | + $class_name = "{$class}Content"; |
|
41 | + Loader::load('utility', "content/{$class_name}"); |
|
42 | + return new $class_name($content); |
|
43 | + } |
|
44 | 44 | |
45 | 45 | } |
@@ -1,42 +1,42 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -abstract class Content |
|
4 | -{ |
|
3 | +abstract class Content |
|
4 | +{ |
|
5 | 5 | |
6 | 6 | protected $original_content; |
7 | 7 | protected $content; |
8 | 8 | |
9 | - function __construct($content) |
|
10 | - { |
|
9 | + function __construct($content) |
|
10 | + { |
|
11 | 11 | $this->original_content = $content; |
12 | 12 | $this->content = $content; |
13 | 13 | } |
14 | 14 | |
15 | - public function getOriginal() |
|
16 | - { |
|
15 | + public function getOriginal() |
|
16 | + { |
|
17 | 17 | return $this->original_content; |
18 | 18 | } |
19 | 19 | |
20 | 20 | abstract protected function execute(); |
21 | 21 | |
22 | - public function activate() |
|
23 | - { |
|
22 | + public function activate() |
|
23 | + { |
|
24 | 24 | $args = func_get_args(); |
25 | 25 | call_user_func_array(array($this, 'execute'), $args); |
26 | 26 | |
27 | 27 | return $this->content; |
28 | 28 | } |
29 | 29 | |
30 | - public function check() |
|
31 | - { |
|
30 | + public function check() |
|
31 | + { |
|
32 | 32 | $args = func_get_args(); |
33 | 33 | $return = call_user_func_array(array($this, 'execute'), $args); |
34 | 34 | |
35 | 35 | return $return; |
36 | 36 | } |
37 | 37 | |
38 | - public static function instance($class, $content) |
|
39 | - { |
|
38 | + public static function instance($class, $content) |
|
39 | + { |
|
40 | 40 | $class_name = "{$class}Content"; |
41 | 41 | Loader::load('utility', "content/{$class_name}"); |
42 | 42 | return new $class_name($content); |
@@ -8,24 +8,24 @@ discard block |
||
8 | 8 | class WaterfallRouter extends Router |
9 | 9 | { |
10 | 10 | |
11 | - protected function get_redirect_array() |
|
12 | - { |
|
13 | - return array( |
|
14 | - (object) array( |
|
15 | - 'pattern' => '@/index.(html|htm|php)$@', |
|
16 | - 'replace' => '/'), |
|
17 | - (object) array( |
|
18 | - 'pattern' => '@^/home(/?)$@', |
|
19 | - 'replace' => '/'), |
|
20 | - (object) array( |
|
21 | - 'pattern' => '@^/falls/by-rating(/?)$@', |
|
22 | - 'replace' => '/falls/'), |
|
23 | - (object) array( |
|
24 | - 'pattern' => '@^/falls/by-rating/([0-9]+)(/?)$@', |
|
25 | - 'replace' => '/falls/'), |
|
26 | - (object) array( |
|
27 | - 'pattern' => '@^/falls/results(/?)$@', |
|
28 | - 'replace' => '/falls/'), |
|
11 | + protected function get_redirect_array() |
|
12 | + { |
|
13 | + return array( |
|
14 | + (object) array( |
|
15 | + 'pattern' => '@/index.(html|htm|php)$@', |
|
16 | + 'replace' => '/'), |
|
17 | + (object) array( |
|
18 | + 'pattern' => '@^/home(/?)$@', |
|
19 | + 'replace' => '/'), |
|
20 | + (object) array( |
|
21 | + 'pattern' => '@^/falls/by-rating(/?)$@', |
|
22 | + 'replace' => '/falls/'), |
|
23 | + (object) array( |
|
24 | + 'pattern' => '@^/falls/by-rating/([0-9]+)(/?)$@', |
|
25 | + 'replace' => '/falls/'), |
|
26 | + (object) array( |
|
27 | + 'pattern' => '@^/falls/results(/?)$@', |
|
28 | + 'replace' => '/falls/'), |
|
29 | 29 | (object) array( |
30 | 30 | 'pattern' => '@^/log(/?)$@', |
31 | 31 | 'replace' => '/journal/'), |
@@ -35,44 +35,44 @@ discard block |
||
35 | 35 | (object) array( |
36 | 36 | 'pattern' => '@^/map/([^/]+)(/?)$@', |
37 | 37 | 'replace' => '/map/'), |
38 | - (object) array( |
|
39 | - 'pattern' => '@^/about/([a-z]*)(/?)$@', |
|
40 | - 'replace' => '/about/'), |
|
41 | - (object) array( |
|
42 | - 'pattern' => '@^/birch-creek/birch-creek-falls/?$@', |
|
43 | - 'replace' => '/birch-creek/gold-mine-falls/'), |
|
44 | - (object) array( |
|
45 | - 'pattern' => '@^/big-iron-river/bonanza-falls/?$@', |
|
46 | - 'replace' => '/big-iron-river/greenwood-falls/'), |
|
47 | - (object) array( |
|
48 | - 'pattern' => '@^/east-branch-huron-river/east-branch-huron-river-falls/?$@', |
|
49 | - 'replace' => '/east-branch-huron-river/east-branch-falls/'), |
|
50 | - (object) array( |
|
51 | - 'pattern' => '@^/montreal-river/lower-montreal-falls/?$@', |
|
52 | - 'replace' => '/montreal-river/montreal-falls/'), |
|
53 | - (object) array( |
|
54 | - 'pattern' => '@^/manganese-creek/manganese-gorge-falls/?$@', |
|
55 | - 'replace' => '/manganese-creek/manganese-falls/'), |
|
56 | - (object) array( |
|
57 | - 'pattern' => '@^/dead-river/tourist-park-dam-falls/?$@', |
|
58 | - 'replace' => '/dead-river/tourist-park-falls/'), |
|
59 | - (object) array( |
|
60 | - 'pattern' => '@^/sturgeon-river/upper-sturgeon-falls/?$@', |
|
61 | - 'replace' => '/sturgeon-river/little-spruce-falls/'), |
|
62 | - (object) array( |
|
63 | - 'pattern' => '@^/tahquamenon-river/upper-tahquamenon-falls/?$@', |
|
64 | - 'replace' => '/tahquamenon-river/tahquamenon-falls/'), |
|
65 | - (object) array( |
|
66 | - 'pattern' => '@^/west-branch-huron-river/west-branch-huron-river-falls/?@', |
|
67 | - 'replace' => '/west-branch-huron-river/west-branch-falls/'), |
|
68 | - (object) array( |
|
69 | - 'pattern' => '@^/west-branch-yellow-dog-river/west-branch-yellow-dog-falls/?@', |
|
70 | - 'replace' => '/west-branch-yellow-dog-river/west-branch-falls/'), |
|
71 | - ); |
|
72 | - } |
|
38 | + (object) array( |
|
39 | + 'pattern' => '@^/about/([a-z]*)(/?)$@', |
|
40 | + 'replace' => '/about/'), |
|
41 | + (object) array( |
|
42 | + 'pattern' => '@^/birch-creek/birch-creek-falls/?$@', |
|
43 | + 'replace' => '/birch-creek/gold-mine-falls/'), |
|
44 | + (object) array( |
|
45 | + 'pattern' => '@^/big-iron-river/bonanza-falls/?$@', |
|
46 | + 'replace' => '/big-iron-river/greenwood-falls/'), |
|
47 | + (object) array( |
|
48 | + 'pattern' => '@^/east-branch-huron-river/east-branch-huron-river-falls/?$@', |
|
49 | + 'replace' => '/east-branch-huron-river/east-branch-falls/'), |
|
50 | + (object) array( |
|
51 | + 'pattern' => '@^/montreal-river/lower-montreal-falls/?$@', |
|
52 | + 'replace' => '/montreal-river/montreal-falls/'), |
|
53 | + (object) array( |
|
54 | + 'pattern' => '@^/manganese-creek/manganese-gorge-falls/?$@', |
|
55 | + 'replace' => '/manganese-creek/manganese-falls/'), |
|
56 | + (object) array( |
|
57 | + 'pattern' => '@^/dead-river/tourist-park-dam-falls/?$@', |
|
58 | + 'replace' => '/dead-river/tourist-park-falls/'), |
|
59 | + (object) array( |
|
60 | + 'pattern' => '@^/sturgeon-river/upper-sturgeon-falls/?$@', |
|
61 | + 'replace' => '/sturgeon-river/little-spruce-falls/'), |
|
62 | + (object) array( |
|
63 | + 'pattern' => '@^/tahquamenon-river/upper-tahquamenon-falls/?$@', |
|
64 | + 'replace' => '/tahquamenon-river/tahquamenon-falls/'), |
|
65 | + (object) array( |
|
66 | + 'pattern' => '@^/west-branch-huron-river/west-branch-huron-river-falls/?@', |
|
67 | + 'replace' => '/west-branch-huron-river/west-branch-falls/'), |
|
68 | + (object) array( |
|
69 | + 'pattern' => '@^/west-branch-yellow-dog-river/west-branch-yellow-dog-falls/?@', |
|
70 | + 'replace' => '/west-branch-yellow-dog-river/west-branch-falls/'), |
|
71 | + ); |
|
72 | + } |
|
73 | 73 | |
74 | - protected function check_for_special_redirect($uri) |
|
75 | - { |
|
74 | + protected function check_for_special_redirect($uri) |
|
75 | + { |
|
76 | 76 | if (preg_match('@^/falls/([a-z\'-]+)(/?)$@', $uri, $matches)) { |
77 | 77 | $alias = $matches[1]; |
78 | 78 | $alias = str_replace("'", '', $alias); |
@@ -125,81 +125,81 @@ discard block |
||
125 | 125 | } |
126 | 126 | } |
127 | 127 | |
128 | - return $uri; |
|
129 | - } |
|
128 | + return $uri; |
|
129 | + } |
|
130 | 130 | |
131 | - protected function get_direct_array() |
|
132 | - { |
|
133 | - return array( |
|
134 | - (object) array( |
|
135 | - 'match' => '/', |
|
136 | - 'controller' => 'HomeController'), |
|
137 | - (object) array( |
|
138 | - 'match' => '/falls/', |
|
139 | - 'controller' => 'WaterfallListController'), |
|
140 | - (object) array( |
|
141 | - 'match' => '/falls/([0-9]+)/', |
|
142 | - 'controller' => 'WaterfallListController'), |
|
143 | - (object) array( |
|
144 | - 'match' => '/([a-z]+)-county/', |
|
145 | - 'controller' => 'CountyListController'), |
|
146 | - (object) array( |
|
147 | - 'match' => '/([a-z]+)-county/([0-9]+)/', |
|
148 | - 'controller' => 'CountyListController'), |
|
149 | - (object) array( |
|
150 | - 'match' => '/([a-z0-9-]+)-(creek|river)/', |
|
151 | - 'controller' => 'WatercourseListController'), |
|
152 | - (object) array( |
|
153 | - 'match' => '/([a-z0-9-]+)-(creek|river)/([0-9]+)/', |
|
154 | - 'controller' => 'WatercourseListController'), |
|
155 | - (object) array( |
|
156 | - 'match' => '/category/([a-z]+)/', |
|
157 | - 'controller' => 'CategoryListController'), |
|
158 | - (object) array( |
|
159 | - 'match' => '/category/([a-z]+)/([0-9]+)/', |
|
160 | - 'controller' => 'CategoryListController'), |
|
161 | - (object) array( |
|
162 | - 'match' => '/([a-z0-9-]+)-(creek|river)/([a-z-]+)/', |
|
163 | - 'controller' => 'WaterfallController'), |
|
164 | - (object) array( |
|
165 | - 'match' => '/map/', |
|
166 | - 'controller' => 'MapController'), |
|
131 | + protected function get_direct_array() |
|
132 | + { |
|
133 | + return array( |
|
134 | + (object) array( |
|
135 | + 'match' => '/', |
|
136 | + 'controller' => 'HomeController'), |
|
137 | + (object) array( |
|
138 | + 'match' => '/falls/', |
|
139 | + 'controller' => 'WaterfallListController'), |
|
140 | + (object) array( |
|
141 | + 'match' => '/falls/([0-9]+)/', |
|
142 | + 'controller' => 'WaterfallListController'), |
|
143 | + (object) array( |
|
144 | + 'match' => '/([a-z]+)-county/', |
|
145 | + 'controller' => 'CountyListController'), |
|
146 | + (object) array( |
|
147 | + 'match' => '/([a-z]+)-county/([0-9]+)/', |
|
148 | + 'controller' => 'CountyListController'), |
|
149 | + (object) array( |
|
150 | + 'match' => '/([a-z0-9-]+)-(creek|river)/', |
|
151 | + 'controller' => 'WatercourseListController'), |
|
152 | + (object) array( |
|
153 | + 'match' => '/([a-z0-9-]+)-(creek|river)/([0-9]+)/', |
|
154 | + 'controller' => 'WatercourseListController'), |
|
155 | + (object) array( |
|
156 | + 'match' => '/category/([a-z]+)/', |
|
157 | + 'controller' => 'CategoryListController'), |
|
158 | + (object) array( |
|
159 | + 'match' => '/category/([a-z]+)/([0-9]+)/', |
|
160 | + 'controller' => 'CategoryListController'), |
|
161 | + (object) array( |
|
162 | + 'match' => '/([a-z0-9-]+)-(creek|river)/([a-z-]+)/', |
|
163 | + 'controller' => 'WaterfallController'), |
|
164 | + (object) array( |
|
165 | + 'match' => '/map/', |
|
166 | + 'controller' => 'MapController'), |
|
167 | 167 | (object) array( |
168 | 168 | 'match' => '/map/#[a-z-/]+', |
169 | 169 | 'controller' => 'MapController'), |
170 | - (object) array( |
|
171 | - 'match' => '/journal/', |
|
172 | - 'controller' => 'LogListController'), |
|
173 | - (object) array( |
|
174 | - 'match' => '/journal/([0-9]+)/', |
|
175 | - 'controller' => 'LogListController'), |
|
176 | - (object) array( |
|
177 | - 'match' => '/journal/[a-z-]+/', |
|
178 | - 'controller' => 'LogController'), |
|
179 | - (object) array( |
|
180 | - 'match' => '/companion/([a-z-]+)/', |
|
181 | - 'controller' => 'CompanionListController'), |
|
182 | - (object) array( |
|
183 | - 'match' => '/companion/([a-z-]+)/([0-9]+)/', |
|
184 | - 'controller' => 'CompanionListController'), |
|
185 | - (object) array( |
|
186 | - 'match' => '/period/([a-z-]+)/', |
|
187 | - 'controller' => 'PeriodListController'), |
|
188 | - (object) array( |
|
189 | - 'match' => '/period/([a-z-]+)/([0-9]+)/', |
|
190 | - 'controller' => 'PeriodListController'), |
|
191 | - (object) array( |
|
192 | - 'match' => '/journal/tag/([a-z-]+)/', |
|
193 | - 'controller' => 'LogTagListController'), |
|
194 | - (object) array( |
|
195 | - 'match' => '/journal/tag/([a-z-]+)/([0-9]+)/', |
|
196 | - 'controller' => 'LogTagListController'), |
|
197 | - (object) array( |
|
198 | - 'match' => '/about/', |
|
199 | - 'controller' => 'AboutController'), |
|
200 | - (object) array( |
|
201 | - 'match' => '/contact/', |
|
202 | - 'controller' => 'ContactController')); |
|
203 | - } |
|
170 | + (object) array( |
|
171 | + 'match' => '/journal/', |
|
172 | + 'controller' => 'LogListController'), |
|
173 | + (object) array( |
|
174 | + 'match' => '/journal/([0-9]+)/', |
|
175 | + 'controller' => 'LogListController'), |
|
176 | + (object) array( |
|
177 | + 'match' => '/journal/[a-z-]+/', |
|
178 | + 'controller' => 'LogController'), |
|
179 | + (object) array( |
|
180 | + 'match' => '/companion/([a-z-]+)/', |
|
181 | + 'controller' => 'CompanionListController'), |
|
182 | + (object) array( |
|
183 | + 'match' => '/companion/([a-z-]+)/([0-9]+)/', |
|
184 | + 'controller' => 'CompanionListController'), |
|
185 | + (object) array( |
|
186 | + 'match' => '/period/([a-z-]+)/', |
|
187 | + 'controller' => 'PeriodListController'), |
|
188 | + (object) array( |
|
189 | + 'match' => '/period/([a-z-]+)/([0-9]+)/', |
|
190 | + 'controller' => 'PeriodListController'), |
|
191 | + (object) array( |
|
192 | + 'match' => '/journal/tag/([a-z-]+)/', |
|
193 | + 'controller' => 'LogTagListController'), |
|
194 | + (object) array( |
|
195 | + 'match' => '/journal/tag/([a-z-]+)/([0-9]+)/', |
|
196 | + 'controller' => 'LogTagListController'), |
|
197 | + (object) array( |
|
198 | + 'match' => '/about/', |
|
199 | + 'controller' => 'AboutController'), |
|
200 | + (object) array( |
|
201 | + 'match' => '/contact/', |
|
202 | + 'controller' => 'ContactController')); |
|
203 | + } |
|
204 | 204 | |
205 | 205 | } |
@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | 'waterfall/WaterfallCollector')); |
6 | 6 | Loader::load('router', 'Router'); |
7 | 7 | |
8 | -class WaterfallRouter extends Router |
|
9 | -{ |
|
8 | +class WaterfallRouter extends Router |
|
9 | +{ |
|
10 | 10 | |
11 | - protected function get_redirect_array() |
|
12 | - { |
|
11 | + protected function get_redirect_array() |
|
12 | + { |
|
13 | 13 | return array( |
14 | 14 | (object) array( |
15 | 15 | 'pattern' => '@/index.(html|htm|php)$@', |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | ); |
72 | 72 | } |
73 | 73 | |
74 | - protected function check_for_special_redirect($uri) |
|
75 | - { |
|
74 | + protected function check_for_special_redirect($uri) |
|
75 | + { |
|
76 | 76 | if (preg_match('@^/falls/([a-z\'-]+)(/?)$@', $uri, $matches)) { |
77 | 77 | $alias = $matches[1]; |
78 | 78 | $alias = str_replace("'", '', $alias); |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | return $uri; |
129 | 129 | } |
130 | 130 | |
131 | - protected function get_direct_array() |
|
132 | - { |
|
131 | + protected function get_direct_array() |
|
132 | + { |
|
133 | 133 | return array( |
134 | 134 | (object) array( |
135 | 135 | 'match' => '/', |
@@ -5,26 +5,26 @@ |
||
5 | 5 | final class HomeRouter extends Router |
6 | 6 | { |
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
10 | - return array( |
|
11 | - (object) array( |
|
12 | - 'pattern' => '@/index.(html|htm|php)$@', |
|
13 | - 'replace' => '')); |
|
14 | - } |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | + return array( |
|
11 | + (object) array( |
|
12 | + 'pattern' => '@/index.(html|htm|php)$@', |
|
13 | + 'replace' => '')); |
|
14 | + } |
|
15 | 15 | |
16 | - protected function get_direct_array() |
|
17 | - { |
|
18 | - return array( |
|
19 | - (object) array( |
|
20 | - 'match' => '/', |
|
21 | - 'controller' => 'HomeController'), |
|
22 | - (object) array( |
|
23 | - 'match' => '/about/', |
|
24 | - 'controller' => 'AboutController'), |
|
25 | - (object) array( |
|
26 | - 'match' => '/contact/', |
|
27 | - 'controller' => 'ContactController')); |
|
28 | - } |
|
16 | + protected function get_direct_array() |
|
17 | + { |
|
18 | + return array( |
|
19 | + (object) array( |
|
20 | + 'match' => '/', |
|
21 | + 'controller' => 'HomeController'), |
|
22 | + (object) array( |
|
23 | + 'match' => '/about/', |
|
24 | + 'controller' => 'AboutController'), |
|
25 | + (object) array( |
|
26 | + 'match' => '/contact/', |
|
27 | + 'controller' => 'ContactController')); |
|
28 | + } |
|
29 | 29 | |
30 | 30 | } |
31 | 31 | \ No newline at end of file |
@@ -2,19 +2,19 @@ |
||
2 | 2 | |
3 | 3 | Loader::load('router', 'Router'); |
4 | 4 | |
5 | -final class HomeRouter extends Router |
|
6 | -{ |
|
5 | +final class HomeRouter extends Router |
|
6 | +{ |
|
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | 10 | return array( |
11 | 11 | (object) array( |
12 | 12 | 'pattern' => '@/index.(html|htm|php)$@', |
13 | 13 | 'replace' => '')); |
14 | 14 | } |
15 | 15 | |
16 | - protected function get_direct_array() |
|
17 | - { |
|
16 | + protected function get_direct_array() |
|
17 | + { |
|
18 | 18 | return array( |
19 | 19 | (object) array( |
20 | 20 | 'match' => '/', |
@@ -5,29 +5,29 @@ |
||
5 | 5 | class SiteRouter extends Router |
6 | 6 | { |
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
10 | - return array( |
|
11 | - (object) array( |
|
12 | - 'pattern' => '@/index.(html|htm|php)$@', |
|
13 | - 'replace' => '/')); |
|
14 | - } |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | + return array( |
|
11 | + (object) array( |
|
12 | + 'pattern' => '@/index.(html|htm|php)$@', |
|
13 | + 'replace' => '/')); |
|
14 | + } |
|
15 | 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 | - } |
|
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 | 32 | |
33 | 33 | } |
34 | 34 | \ No newline at end of file |
@@ -2,19 +2,19 @@ |
||
2 | 2 | |
3 | 3 | Loader::load('router', 'Router'); |
4 | 4 | |
5 | -class SiteRouter extends Router |
|
6 | -{ |
|
5 | +class SiteRouter extends Router |
|
6 | +{ |
|
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | 10 | return array( |
11 | 11 | (object) array( |
12 | 12 | 'pattern' => '@/index.(html|htm|php)$@', |
13 | 13 | 'replace' => '/')); |
14 | 14 | } |
15 | 15 | |
16 | - protected function get_direct_array() |
|
17 | - { |
|
16 | + protected function get_direct_array() |
|
17 | + { |
|
18 | 18 | return array( |
19 | 19 | (object) array( |
20 | 20 | 'match' => '/', |
@@ -5,54 +5,54 @@ |
||
5 | 5 | class LifestreamRouter extends Router |
6 | 6 | { |
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
10 | - return array( |
|
11 | - (object) array( |
|
12 | - 'pattern' => '@/index.(html|htm|php)$@', |
|
13 | - 'replace' => '/'), |
|
14 | - (object) array( |
|
15 | - 'pattern' => '@^/1/$@', |
|
16 | - 'replace' => '/'), |
|
17 | - (object) array( |
|
18 | - 'pattern' => '@/page_([0-9]+)(/?)$@', |
|
19 | - 'replace' => '/page/$1/'), |
|
20 | - (object) array( |
|
21 | - 'pattern' => '@/tag/([a-z]+)/$@', |
|
22 | - 'replace' => '/$1/'), |
|
23 | - (object) array( |
|
24 | - 'pattern' => '@/tag/([a-z]+)/page/([0-9]+)/$@', |
|
25 | - 'replace' => '/$1/page/$2/'), |
|
26 | - (object) array( |
|
27 | - 'pattern' => '@/tag/([a-z-]+)/$@', |
|
28 | - 'replace' => '/'), |
|
29 | - (object) array( |
|
30 | - 'pattern' => '@/tag/([a-z-]+)/page/([0-9]+)/$@', |
|
31 | - 'replace' => '/')); |
|
32 | - } |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | + return array( |
|
11 | + (object) array( |
|
12 | + 'pattern' => '@/index.(html|htm|php)$@', |
|
13 | + 'replace' => '/'), |
|
14 | + (object) array( |
|
15 | + 'pattern' => '@^/1/$@', |
|
16 | + 'replace' => '/'), |
|
17 | + (object) array( |
|
18 | + 'pattern' => '@/page_([0-9]+)(/?)$@', |
|
19 | + 'replace' => '/page/$1/'), |
|
20 | + (object) array( |
|
21 | + 'pattern' => '@/tag/([a-z]+)/$@', |
|
22 | + 'replace' => '/$1/'), |
|
23 | + (object) array( |
|
24 | + 'pattern' => '@/tag/([a-z]+)/page/([0-9]+)/$@', |
|
25 | + 'replace' => '/$1/page/$2/'), |
|
26 | + (object) array( |
|
27 | + 'pattern' => '@/tag/([a-z-]+)/$@', |
|
28 | + 'replace' => '/'), |
|
29 | + (object) array( |
|
30 | + 'pattern' => '@/tag/([a-z-]+)/page/([0-9]+)/$@', |
|
31 | + 'replace' => '/')); |
|
32 | + } |
|
33 | 33 | |
34 | - protected function get_direct_array() |
|
35 | - { |
|
36 | - return array( |
|
37 | - (object) array( |
|
38 | - 'match' => '/', |
|
39 | - 'controller' => 'HomeController'), |
|
40 | - (object) array( |
|
41 | - 'match' => '/about/', |
|
42 | - 'controller' => 'AboutController'), |
|
43 | - (object) array( |
|
44 | - 'match' => '/page/([0-9]+)/', |
|
45 | - 'controller' => 'HomeController'), |
|
46 | - (object) array( |
|
47 | - 'match' => '/([a-z]+)/', |
|
48 | - 'controller' => 'TagController'), |
|
49 | - (object) array( |
|
50 | - 'match' => '/([a-z]+)/page/([0-9]+)/', |
|
51 | - 'controller' => 'TagController'), |
|
52 | - (object) array( |
|
53 | - 'match' => '/([a-z]+)/([0-9]+)/', |
|
54 | - 'controller' => 'PostController')); |
|
55 | - } |
|
34 | + protected function get_direct_array() |
|
35 | + { |
|
36 | + return array( |
|
37 | + (object) array( |
|
38 | + 'match' => '/', |
|
39 | + 'controller' => 'HomeController'), |
|
40 | + (object) array( |
|
41 | + 'match' => '/about/', |
|
42 | + 'controller' => 'AboutController'), |
|
43 | + (object) array( |
|
44 | + 'match' => '/page/([0-9]+)/', |
|
45 | + 'controller' => 'HomeController'), |
|
46 | + (object) array( |
|
47 | + 'match' => '/([a-z]+)/', |
|
48 | + 'controller' => 'TagController'), |
|
49 | + (object) array( |
|
50 | + 'match' => '/([a-z]+)/page/([0-9]+)/', |
|
51 | + 'controller' => 'TagController'), |
|
52 | + (object) array( |
|
53 | + 'match' => '/([a-z]+)/([0-9]+)/', |
|
54 | + 'controller' => 'PostController')); |
|
55 | + } |
|
56 | 56 | |
57 | 57 | } |
58 | 58 |
@@ -2,11 +2,11 @@ discard block |
||
2 | 2 | |
3 | 3 | Loader::load('router', 'Router'); |
4 | 4 | |
5 | -class LifestreamRouter extends Router |
|
6 | -{ |
|
5 | +class LifestreamRouter extends Router |
|
6 | +{ |
|
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | 10 | return array( |
11 | 11 | (object) array( |
12 | 12 | 'pattern' => '@/index.(html|htm|php)$@', |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | 'replace' => '/')); |
32 | 32 | } |
33 | 33 | |
34 | - protected function get_direct_array() |
|
35 | - { |
|
34 | + protected function get_direct_array() |
|
35 | + { |
|
36 | 36 | return array( |
37 | 37 | (object) array( |
38 | 38 | 'match' => '/', |
@@ -5,22 +5,22 @@ |
||
5 | 5 | class AJAXRouter extends Router |
6 | 6 | { |
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
10 | - return array( |
|
11 | - (object) array( |
|
12 | - 'pattern' => '@^/$@', |
|
13 | - 'replace' => 'https://home.jacobemerick.com/')); |
|
14 | - } |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | + return array( |
|
11 | + (object) array( |
|
12 | + 'pattern' => '@^/$@', |
|
13 | + 'replace' => 'https://home.jacobemerick.com/')); |
|
14 | + } |
|
15 | 15 | |
16 | - protected function get_direct_array() |
|
17 | - { |
|
18 | - return array( |
|
19 | - (object) array( |
|
20 | - 'match' => '/get/portfolioImage.json', |
|
21 | - 'controller' => 'GetPortfolioImageController'), |
|
16 | + protected function get_direct_array() |
|
17 | + { |
|
18 | + return array( |
|
19 | + (object) array( |
|
20 | + 'match' => '/get/portfolioImage.json', |
|
21 | + 'controller' => 'GetPortfolioImageController'), |
|
22 | 22 | ); |
23 | - } |
|
23 | + } |
|
24 | 24 | |
25 | 25 | } |
26 | 26 |
@@ -2,19 +2,19 @@ |
||
2 | 2 | |
3 | 3 | Loader::load('router', 'Router'); |
4 | 4 | |
5 | -class AJAXRouter extends Router |
|
6 | -{ |
|
5 | +class AJAXRouter extends Router |
|
6 | +{ |
|
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | 10 | return array( |
11 | 11 | (object) array( |
12 | 12 | 'pattern' => '@^/$@', |
13 | 13 | 'replace' => 'https://home.jacobemerick.com/')); |
14 | 14 | } |
15 | 15 | |
16 | - protected function get_direct_array() |
|
17 | - { |
|
16 | + protected function get_direct_array() |
|
17 | + { |
|
18 | 18 | return array( |
19 | 19 | (object) array( |
20 | 20 | 'match' => '/get/portfolioImage.json', |