@@ -5,32 +5,32 @@ |
||
| 5 | 5 | final class AboutController extends DefaultPageController |
| 6 | 6 | { |
| 7 | 7 | |
| 8 | - private static $TITLE = 'About | Jacob Emerick'; |
|
| 9 | - private static $DESCRIPTION = 'Some basic information about Jacob Emerick and his past, web development, and hiking adventures'; |
|
| 8 | + private static $TITLE = 'About | Jacob Emerick'; |
|
| 9 | + private static $DESCRIPTION = 'Some basic information about Jacob Emerick and his past, web development, and hiking adventures'; |
|
| 10 | 10 | |
| 11 | - private static $KEYWORD_ARRAY = array( |
|
| 12 | - 'Jacob Emerick', |
|
| 13 | - 'jacobemerick', |
|
| 14 | - 'jpemeric', |
|
| 15 | - 'about', |
|
| 16 | - 'bio', |
|
| 17 | - 'web developer', |
|
| 18 | - 'hiker'); |
|
| 11 | + private static $KEYWORD_ARRAY = array( |
|
| 12 | + 'Jacob Emerick', |
|
| 13 | + 'jacobemerick', |
|
| 14 | + 'jpemeric', |
|
| 15 | + 'about', |
|
| 16 | + 'bio', |
|
| 17 | + 'web developer', |
|
| 18 | + 'hiker'); |
|
| 19 | 19 | |
| 20 | - protected function set_head_data() |
|
| 21 | - { |
|
| 22 | - $this->set_title(self::$TITLE); |
|
| 23 | - $this->set_description(self::$DESCRIPTION); |
|
| 24 | - $this->set_keywords(self::$KEYWORD_ARRAY); |
|
| 20 | + protected function set_head_data() |
|
| 21 | + { |
|
| 22 | + $this->set_title(self::$TITLE); |
|
| 23 | + $this->set_description(self::$DESCRIPTION); |
|
| 24 | + $this->set_keywords(self::$KEYWORD_ARRAY); |
|
| 25 | 25 | |
| 26 | - parent::set_head_data(); |
|
| 27 | - } |
|
| 26 | + parent::set_head_data(); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - protected function set_body_data() |
|
| 30 | - { |
|
| 31 | - $this->set_body_view('About'); |
|
| 29 | + protected function set_body_data() |
|
| 30 | + { |
|
| 31 | + $this->set_body_view('About'); |
|
| 32 | 32 | |
| 33 | - parent::set_body_data(); |
|
| 34 | - } |
|
| 33 | + parent::set_body_data(); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | \ No newline at end of file |
@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'home/DefaultPageController'); |
| 4 | 4 | |
| 5 | -final class AboutController extends DefaultPageController |
|
| 6 | -{ |
|
| 5 | +final class AboutController extends DefaultPageController |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | 8 | private static $TITLE = 'About | Jacob Emerick'; |
| 9 | 9 | private static $DESCRIPTION = 'Some basic information about Jacob Emerick and his past, web development, and hiking adventures'; |
@@ -17,8 +17,7 @@ discard block |
||
| 17 | 17 | 'web developer', |
| 18 | 18 | 'hiker'); |
| 19 | 19 | |
| 20 | - protected function set_head_data() |
|
| 21 | - { |
|
| 20 | + protected function set_head_data() {
|
|
| 22 | 21 | $this->set_title(self::$TITLE); |
| 23 | 22 | $this->set_description(self::$DESCRIPTION); |
| 24 | 23 | $this->set_keywords(self::$KEYWORD_ARRAY); |
@@ -26,8 +25,7 @@ discard block |
||
| 26 | 25 | parent::set_head_data(); |
| 27 | 26 | } |
| 28 | 27 | |
| 29 | - protected function set_body_data() |
|
| 30 | - { |
|
| 28 | + protected function set_body_data() {
|
|
| 31 | 29 | $this->set_body_view('About'); |
| 32 | 30 | |
| 33 | 31 | parent::set_body_data(); |
@@ -5,22 +5,22 @@ |
||
| 5 | 5 | final class TermsController extends DefaultPageController |
| 6 | 6 | { |
| 7 | 7 | |
| 8 | - protected function set_head_data() |
|
| 9 | - { |
|
| 10 | - $this->set_title("Terms of Use for Jacob Emerick's Sites"); |
|
| 11 | - $this->set_description("Some basic (and boring) legal jargon and perferred usage of the content on Jacob Emerick's sites. Includes re-use terms and advice on retracing hikes."); |
|
| 12 | - $this->set_keywords(array('terms of use', 'legal', 'accountability', 'trespassing', 'Jacob Emerick')); |
|
| 8 | + protected function set_head_data() |
|
| 9 | + { |
|
| 10 | + $this->set_title("Terms of Use for Jacob Emerick's Sites"); |
|
| 11 | + $this->set_description("Some basic (and boring) legal jargon and perferred usage of the content on Jacob Emerick's sites. Includes re-use terms and advice on retracing hikes."); |
|
| 12 | + $this->set_keywords(array('terms of use', 'legal', 'accountability', 'trespassing', 'Jacob Emerick')); |
|
| 13 | 13 | |
| 14 | - parent::set_head_data(); |
|
| 15 | - } |
|
| 14 | + parent::set_head_data(); |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - protected function set_body_data() |
|
| 18 | - { |
|
| 19 | - $this->set_body('top_data', array('title' => 'Terms of Use')); |
|
| 17 | + protected function set_body_data() |
|
| 18 | + { |
|
| 19 | + $this->set_body('top_data', array('title' => 'Terms of Use')); |
|
| 20 | 20 | |
| 21 | - $this->set_body('body_view', 'Terms'); |
|
| 21 | + $this->set_body('body_view', 'Terms'); |
|
| 22 | 22 | |
| 23 | - parent::set_body_data(); |
|
| 24 | - } |
|
| 23 | + parent::set_body_data(); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | 26 | } |
@@ -2,11 +2,10 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'site/DefaultPageController'); |
| 4 | 4 | |
| 5 | -final class TermsController extends DefaultPageController |
|
| 6 | -{ |
|
| 5 | +final class TermsController extends DefaultPageController |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | - protected function set_head_data() |
|
| 9 | - { |
|
| 8 | + protected function set_head_data() {
|
|
| 10 | 9 | $this->set_title("Terms of Use for Jacob Emerick's Sites"); |
| 11 | 10 | $this->set_description("Some basic (and boring) legal jargon and perferred usage of the content on Jacob Emerick's sites. Includes re-use terms and advice on retracing hikes."); |
| 12 | 11 | $this->set_keywords(array('terms of use', 'legal', 'accountability', 'trespassing', 'Jacob Emerick')); |
@@ -14,8 +13,7 @@ discard block |
||
| 14 | 13 | parent::set_head_data(); |
| 15 | 14 | } |
| 16 | 15 | |
| 17 | - protected function set_body_data() |
|
| 18 | - { |
|
| 16 | + protected function set_body_data() {
|
|
| 19 | 17 | $this->set_body('top_data', array('title' => 'Terms of Use')); |
| 20 | 18 | |
| 21 | 19 | $this->set_body('body_view', 'Terms'); |
@@ -5,20 +5,20 @@ |
||
| 5 | 5 | final class HomeController extends DefaultPageController |
| 6 | 6 | { |
| 7 | 7 | |
| 8 | - protected function set_head_data() |
|
| 9 | - { |
|
| 10 | - $this->set_title("Jacob Emerick's Site Information | General and Technical Information"); |
|
| 11 | - $this->set_description("Meta information about Jacob Emerick's websites and content. Introduces the man behind the code, discusses the reasons behind the sites, and goes into some technical background of the custom framework."); |
|
| 12 | - $this->set_keywords(array('site', 'technical', 'support', 'help', 'information', 'Jacob Emerick')); |
|
| 8 | + protected function set_head_data() |
|
| 9 | + { |
|
| 10 | + $this->set_title("Jacob Emerick's Site Information | General and Technical Information"); |
|
| 11 | + $this->set_description("Meta information about Jacob Emerick's websites and content. Introduces the man behind the code, discusses the reasons behind the sites, and goes into some technical background of the custom framework."); |
|
| 12 | + $this->set_keywords(array('site', 'technical', 'support', 'help', 'information', 'Jacob Emerick')); |
|
| 13 | 13 | |
| 14 | - parent::set_head_data(); |
|
| 15 | - } |
|
| 14 | + parent::set_head_data(); |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - protected function set_body_data() |
|
| 18 | - { |
|
| 19 | - $this->set_body('body_view', 'Home'); |
|
| 17 | + protected function set_body_data() |
|
| 18 | + { |
|
| 19 | + $this->set_body('body_view', 'Home'); |
|
| 20 | 20 | |
| 21 | - parent::set_body_data(); |
|
| 22 | - } |
|
| 21 | + parent::set_body_data(); |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | 24 | } |
| 25 | 25 | \ No newline at end of file |
@@ -2,11 +2,10 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'site/DefaultPageController'); |
| 4 | 4 | |
| 5 | -final class HomeController extends DefaultPageController |
|
| 6 | -{ |
|
| 5 | +final class HomeController extends DefaultPageController |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | - protected function set_head_data() |
|
| 9 | - { |
|
| 8 | + protected function set_head_data() {
|
|
| 10 | 9 | $this->set_title("Jacob Emerick's Site Information | General and Technical Information"); |
| 11 | 10 | $this->set_description("Meta information about Jacob Emerick's websites and content. Introduces the man behind the code, discusses the reasons behind the sites, and goes into some technical background of the custom framework."); |
| 12 | 11 | $this->set_keywords(array('site', 'technical', 'support', 'help', 'information', 'Jacob Emerick')); |
@@ -14,8 +13,7 @@ discard block |
||
| 14 | 13 | parent::set_head_data(); |
| 15 | 14 | } |
| 16 | 15 | |
| 17 | - protected function set_body_data() |
|
| 18 | - { |
|
| 16 | + protected function set_body_data() {
|
|
| 19 | 17 | $this->set_body('body_view', 'Home'); |
| 20 | 18 | |
| 21 | 19 | parent::set_body_data(); |
@@ -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,11 +2,10 @@ |
||
| 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) {
|
|
| 10 | 9 | Header::redirect($uri, 303); |
| 11 | 10 | exit; |
| 12 | 11 | } |
@@ -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,10 @@ 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() {
|
|
| 10 | 9 | $this->set_header_method('send404'); |
| 11 | 10 | $this->add_css('normalize'); |
| 12 | 11 | $this->add_css('404'); |
@@ -16,15 +15,13 @@ discard block |
||
| 16 | 15 | $this->set_head('keywords', ''); |
| 17 | 16 | } |
| 18 | 17 | |
| 19 | - protected function set_body_data() |
|
| 20 | - { |
|
| 18 | + protected function set_body_data() {
|
|
| 21 | 19 | $this->set_body('site_list', $this->get_sites()); |
| 22 | 20 | |
| 23 | 21 | $this->set_body_view('/404'); |
| 24 | 22 | } |
| 25 | 23 | |
| 26 | - private function get_sites() |
|
| 27 | - { |
|
| 24 | + private function get_sites() {
|
|
| 28 | 25 | return [ |
| 29 | 26 | [ |
| 30 | 27 | '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,10 @@ |
||
| 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() {
|
|
| 10 | 9 | $this->content = strtolower(str_replace(' ', '-', $this->content)); |
| 11 | 10 | } |
| 12 | 11 | |
@@ -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,37 @@ |
||
| 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) {
|
|
| 11 | 10 | $this->original_content = $content; |
| 12 | 11 | $this->content = $content; |
| 13 | 12 | } |
| 14 | 13 | |
| 15 | - public function getOriginal() |
|
| 16 | - { |
|
| 14 | + public function getOriginal() {
|
|
| 17 | 15 | return $this->original_content; |
| 18 | 16 | } |
| 19 | 17 | |
| 20 | 18 | abstract protected function execute(); |
| 21 | 19 | |
| 22 | - public function activate() |
|
| 23 | - { |
|
| 20 | + public function activate() {
|
|
| 24 | 21 | $args = func_get_args(); |
| 25 | 22 | call_user_func_array(array($this, 'execute'), $args); |
| 26 | 23 | |
| 27 | 24 | return $this->content; |
| 28 | 25 | } |
| 29 | 26 | |
| 30 | - public function check() |
|
| 31 | - { |
|
| 27 | + public function check() {
|
|
| 32 | 28 | $args = func_get_args(); |
| 33 | 29 | $return = call_user_func_array(array($this, 'execute'), $args); |
| 34 | 30 | |
| 35 | 31 | return $return; |
| 36 | 32 | } |
| 37 | 33 | |
| 38 | - public static function instance($class, $content) |
|
| 39 | - { |
|
| 34 | + public static function instance($class, $content) {
|
|
| 40 | 35 | $class_name = "{$class}Content"; |
| 41 | 36 | Loader::load('utility', "content/{$class_name}"); |
| 42 | 37 | 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,10 @@ 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() {
|
|
| 13 | 12 | return array( |
| 14 | 13 | (object) array( |
| 15 | 14 | 'pattern' => '@/index.(html|htm|php)$@', |
@@ -71,8 +70,7 @@ discard block |
||
| 71 | 70 | ); |
| 72 | 71 | } |
| 73 | 72 | |
| 74 | - protected function check_for_special_redirect($uri) |
|
| 75 | - { |
|
| 73 | + protected function check_for_special_redirect($uri) {
|
|
| 76 | 74 | if (preg_match('@^/falls/([a-z\'-]+)(/?)$@', $uri, $matches)) { |
| 77 | 75 | $alias = $matches[1]; |
| 78 | 76 | $alias = str_replace("'", '', $alias); |
@@ -128,8 +126,7 @@ discard block |
||
| 128 | 126 | return $uri; |
| 129 | 127 | } |
| 130 | 128 | |
| 131 | - protected function get_direct_array() |
|
| 132 | - { |
|
| 129 | + protected function get_direct_array() {
|
|
| 133 | 130 | return array( |
| 134 | 131 | (object) array( |
| 135 | 132 | '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,17 @@ |
||
| 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() {
|
|
| 10 | 9 | return array( |
| 11 | 10 | (object) array( |
| 12 | 11 | 'pattern' => '@/index.(html|htm|php)$@', |
| 13 | 12 | 'replace' => '')); |
| 14 | 13 | } |
| 15 | 14 | |
| 16 | - protected function get_direct_array() |
|
| 17 | - { |
|
| 15 | + protected function get_direct_array() {
|
|
| 18 | 16 | return array( |
| 19 | 17 | (object) array( |
| 20 | 18 | 'match' => '/', |