@@ -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', |
@@ -2,11 +2,11 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'portfolio/DefaultPageController'); |
| 4 | 4 | |
| 5 | -class ProjectsController extends DefaultPageController |
|
| 6 | -{ |
|
| 5 | +class ProjectsController extends DefaultPageController |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | - protected function set_head_data() |
|
| 9 | - { |
|
| 8 | + protected function set_head_data() |
|
| 9 | + {
|
|
| 10 | 10 | $this->set_title("Projects Page | Jacob Emerick's Portfolio"); |
| 11 | 11 | $this->set_description("Collection of key open-source projects that Jacob has developed and maintained over the years."); |
| 12 | 12 | $this->set_keywords([ |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | ]); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - protected function set_body_data() |
|
| 23 | - { |
|
| 22 | + protected function set_body_data() |
|
| 23 | + {
|
|
| 24 | 24 | $this->set_body('body_view', 'Projects'); |
| 25 | 25 | $this->set_body('body_data', []); |
| 26 | 26 | |
@@ -2,11 +2,11 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'portfolio/DefaultPageController'); |
| 4 | 4 | |
| 5 | -class AboutController extends DefaultPageController |
|
| 6 | -{ |
|
| 5 | +class AboutController extends DefaultPageController |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | - protected function set_head_data() |
|
| 9 | - { |
|
| 8 | + protected function set_head_data() |
|
| 9 | + {
|
|
| 10 | 10 | $this->set_title("Jacob Emerick's Portfolio"); |
| 11 | 11 | $this->set_description("Jacob Emerick's Portfolio - collection of programming projects and resume"); |
| 12 | 12 | $this->set_keywords([ |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | ]); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - protected function set_body_data() |
|
| 24 | - { |
|
| 23 | + protected function set_body_data() |
|
| 24 | + {
|
|
| 25 | 25 | $this->set_body('body_view', 'About'); |
| 26 | 26 | $this->set_body('body_data', []); |
| 27 | 27 | |
@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('controller', 'waterfalls/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 the Website | Waterfalls of the Keweenaw'; |
| 9 | 9 | private static $DESCRIPTION = 'A little bit about the website, the area, and the reason why someone would hunt down a hundred and fifty waterfalls in the Upper Peninsula.'; |
@@ -14,8 +14,8 @@ discard block |
||
| 14 | 14 | 'Jacob Emerick', |
| 15 | 15 | ); |
| 16 | 16 | |
| 17 | - protected function set_head_data() |
|
| 18 | - { |
|
| 17 | + protected function set_head_data() |
|
| 18 | + {
|
|
| 19 | 19 | parent::set_head_data(); |
| 20 | 20 | |
| 21 | 21 | $this->set_title(self::$TITLE); |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | $this->set_keywords(self::$KEYWORD_ARRAY); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - protected function set_body_data($page_type = 'normal') |
|
| 27 | - { |
|
| 26 | + protected function set_body_data($page_type = 'normal') |
|
| 27 | + {
|
|
| 28 | 28 | parent::set_body_data($page_type); |
| 29 | 29 | |
| 30 | 30 | $this->set_body('view', 'About'); |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlTagRepository implements TagRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlTagRepository implements TagRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) |
|
| 17 | + {
|
|
| 18 | 18 | $this->connections = $connections; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return array|false |
| 25 | 25 | */ |
| 26 | - public function findTagByTitle($title) |
|
| 27 | - { |
|
| 26 | + public function findTagByTitle($title) |
|
| 27 | + {
|
|
| 28 | 28 | $query = " |
| 29 | 29 | SELECT * |
| 30 | 30 | FROM `jpemeric_blog`.`tag` |
@@ -40,8 +40,8 @@ discard block |
||
| 40 | 40 | ->fetchOne($query, $bindings); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - public function getAllTags() |
|
| 44 | - { |
|
| 43 | + public function getAllTags() |
|
| 44 | + {
|
|
| 45 | 45 | $query = " |
| 46 | 46 | SELECT * |
| 47 | 47 | FROM `jpemeric_blog`.`tag` |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | ->fetchAll($query); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - public function getTagCloud() |
|
| 57 | - { |
|
| 56 | + public function getTagCloud() |
|
| 57 | + {
|
|
| 58 | 58 | $query = " |
| 59 | 59 | SELECT COUNT(1) AS `count`, `tag` |
| 60 | 60 | FROM `jpemeric_blog`.`tag` |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | ->fetchAll($query, $bindings); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - public function getTagsForPost($post) |
|
| 76 | - { |
|
| 75 | + public function getTagsForPost($post) |
|
| 76 | + {
|
|
| 77 | 77 | $query = " |
| 78 | 78 | SELECT `tag`.* |
| 79 | 79 | FROM `jpemeric_blog`.`tag` |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlIntroductionRepository implements IntroductionRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlIntroductionRepository implements IntroductionRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) |
|
| 17 | + {
|
|
| 18 | 18 | $this->connections = $connections; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | * |
| 25 | 25 | * @return array|false |
| 26 | 26 | */ |
| 27 | - public function findByType($type, $value = '') |
|
| 28 | - { |
|
| 27 | + public function findByType($type, $value = '') |
|
| 28 | + {
|
|
| 29 | 29 | $query = " |
| 30 | 30 | SELECT `title`, `content`, `image` |
| 31 | 31 | FROM `jpemeric_blog`.`introduction` |