@@ -18,9 +18,9 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | static function getServer($key = null) |
| 20 | 20 | { |
| 21 | - if($key) |
|
| 21 | + if ($key) |
|
| 22 | 22 | { |
| 23 | - if(isset(self::$server[$key])) |
|
| 23 | + if (isset(self::$server[$key])) |
|
| 24 | 24 | return self::$server[$key]; |
| 25 | 25 | return false; |
| 26 | 26 | } |
@@ -29,16 +29,16 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | static function isAjax() |
| 31 | 31 | { |
| 32 | - if(self::getServer(self::$AJAX_REQUEST)) |
|
| 32 | + if (self::getServer(self::$AJAX_REQUEST)) |
|
| 33 | 33 | return true; |
| 34 | 34 | return false; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | static function getGet($key = null) |
| 38 | 38 | { |
| 39 | - if($key) |
|
| 39 | + if ($key) |
|
| 40 | 40 | { |
| 41 | - if(isset(self::$get[$key])) |
|
| 41 | + if (isset(self::$get[$key])) |
|
| 42 | 42 | return self::$get[$key]; |
| 43 | 43 | return false; |
| 44 | 44 | } |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | static function getPost($key = null) |
| 49 | 49 | { |
| 50 | - if($key) |
|
| 50 | + if ($key) |
|
| 51 | 51 | { |
| 52 | - if(isset(self::$post[$key])) |
|
| 52 | + if (isset(self::$post[$key])) |
|
| 53 | 53 | return self::$post[$key]; |
| 54 | 54 | return false; |
| 55 | 55 | } |
@@ -3,78 +3,78 @@ |
||
| 3 | 3 | class Request |
| 4 | 4 | { |
| 5 | 5 | |
| 6 | - private static $server = array(); |
|
| 7 | - private static $get = array(); |
|
| 8 | - private static $post = array(); |
|
| 6 | + private static $server = array(); |
|
| 7 | + private static $get = array(); |
|
| 8 | + private static $post = array(); |
|
| 9 | 9 | |
| 10 | - private static $AJAX_REQUEST = 'HTTP_X_REQUESTED_WITH'; |
|
| 10 | + private static $AJAX_REQUEST = 'HTTP_X_REQUESTED_WITH'; |
|
| 11 | 11 | |
| 12 | - static function init() |
|
| 13 | - { |
|
| 14 | - self::make_server(); |
|
| 15 | - self::make_get(); |
|
| 16 | - self::make_post(); |
|
| 17 | - } |
|
| 12 | + static function init() |
|
| 13 | + { |
|
| 14 | + self::make_server(); |
|
| 15 | + self::make_get(); |
|
| 16 | + self::make_post(); |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - static function getServer($key = null) |
|
| 20 | - { |
|
| 21 | - if($key) |
|
| 22 | - { |
|
| 23 | - if(isset(self::$server[$key])) |
|
| 24 | - return self::$server[$key]; |
|
| 25 | - return false; |
|
| 26 | - } |
|
| 27 | - return self::$server; |
|
| 28 | - } |
|
| 19 | + static function getServer($key = null) |
|
| 20 | + { |
|
| 21 | + if($key) |
|
| 22 | + { |
|
| 23 | + if(isset(self::$server[$key])) |
|
| 24 | + return self::$server[$key]; |
|
| 25 | + return false; |
|
| 26 | + } |
|
| 27 | + return self::$server; |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | - static function isAjax() |
|
| 31 | - { |
|
| 32 | - if(self::getServer(self::$AJAX_REQUEST)) |
|
| 33 | - return true; |
|
| 34 | - return false; |
|
| 35 | - } |
|
| 30 | + static function isAjax() |
|
| 31 | + { |
|
| 32 | + if(self::getServer(self::$AJAX_REQUEST)) |
|
| 33 | + return true; |
|
| 34 | + return false; |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - static function getGet($key = null) |
|
| 38 | - { |
|
| 39 | - if($key) |
|
| 40 | - { |
|
| 41 | - if(isset(self::$get[$key])) |
|
| 42 | - return self::$get[$key]; |
|
| 43 | - return false; |
|
| 44 | - } |
|
| 45 | - return self::$get; |
|
| 46 | - } |
|
| 37 | + static function getGet($key = null) |
|
| 38 | + { |
|
| 39 | + if($key) |
|
| 40 | + { |
|
| 41 | + if(isset(self::$get[$key])) |
|
| 42 | + return self::$get[$key]; |
|
| 43 | + return false; |
|
| 44 | + } |
|
| 45 | + return self::$get; |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - static function getPost($key = null) |
|
| 49 | - { |
|
| 50 | - if($key) |
|
| 51 | - { |
|
| 52 | - if(isset(self::$post[$key])) |
|
| 53 | - return self::$post[$key]; |
|
| 54 | - return false; |
|
| 55 | - } |
|
| 56 | - return self::$post; |
|
| 57 | - } |
|
| 48 | + static function getPost($key = null) |
|
| 49 | + { |
|
| 50 | + if($key) |
|
| 51 | + { |
|
| 52 | + if(isset(self::$post[$key])) |
|
| 53 | + return self::$post[$key]; |
|
| 54 | + return false; |
|
| 55 | + } |
|
| 56 | + return self::$post; |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - public static function hasPost() |
|
| 60 | - { |
|
| 61 | - return is_array(self::$post) && !empty(self::$post); |
|
| 62 | - } |
|
| 59 | + public static function hasPost() |
|
| 60 | + { |
|
| 61 | + return is_array(self::$post) && !empty(self::$post); |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - static function make_server() |
|
| 65 | - { |
|
| 66 | - self::$server = $_SERVER; |
|
| 67 | - } |
|
| 64 | + static function make_server() |
|
| 65 | + { |
|
| 66 | + self::$server = $_SERVER; |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - static function make_get() |
|
| 70 | - { |
|
| 71 | - self::$get = $_GET; |
|
| 72 | - } |
|
| 69 | + static function make_get() |
|
| 70 | + { |
|
| 71 | + self::$get = $_GET; |
|
| 72 | + } |
|
| 73 | 73 | |
| 74 | - static function make_post() |
|
| 75 | - { |
|
| 76 | - self::$post = $_POST; |
|
| 77 | - } |
|
| 74 | + static function make_post() |
|
| 75 | + { |
|
| 76 | + self::$post = $_POST; |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | 79 | } |
| 80 | 80 | |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -class Request |
|
| 4 | -{ |
|
| 3 | +class Request |
|
| 4 | +{
|
|
| 5 | 5 | |
| 6 | 6 | private static $server = array(); |
| 7 | 7 | private static $get = array(); |
@@ -9,70 +9,74 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | private static $AJAX_REQUEST = 'HTTP_X_REQUESTED_WITH'; |
| 11 | 11 | |
| 12 | - static function init() |
|
| 13 | - { |
|
| 12 | + static function init() |
|
| 13 | + {
|
|
| 14 | 14 | self::make_server(); |
| 15 | 15 | self::make_get(); |
| 16 | 16 | self::make_post(); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | - static function getServer($key = null) |
|
| 20 | - { |
|
| 19 | + static function getServer($key = null) |
|
| 20 | + {
|
|
| 21 | 21 | if($key) |
| 22 | 22 | { |
| 23 | - if(isset(self::$server[$key])) |
|
| 24 | - return self::$server[$key]; |
|
| 23 | + if(isset(self::$server[$key])) {
|
|
| 24 | + return self::$server[$key]; |
|
| 25 | + } |
|
| 25 | 26 | return false; |
| 26 | 27 | } |
| 27 | 28 | return self::$server; |
| 28 | 29 | } |
| 29 | 30 | |
| 30 | - static function isAjax() |
|
| 31 | - { |
|
| 32 | - if(self::getServer(self::$AJAX_REQUEST)) |
|
| 33 | - return true; |
|
| 31 | + static function isAjax() |
|
| 32 | + {
|
|
| 33 | + if(self::getServer(self::$AJAX_REQUEST)) {
|
|
| 34 | + return true; |
|
| 35 | + } |
|
| 34 | 36 | return false; |
| 35 | 37 | } |
| 36 | 38 | |
| 37 | - static function getGet($key = null) |
|
| 38 | - { |
|
| 39 | + static function getGet($key = null) |
|
| 40 | + {
|
|
| 39 | 41 | if($key) |
| 40 | 42 | { |
| 41 | - if(isset(self::$get[$key])) |
|
| 42 | - return self::$get[$key]; |
|
| 43 | + if(isset(self::$get[$key])) {
|
|
| 44 | + return self::$get[$key]; |
|
| 45 | + } |
|
| 43 | 46 | return false; |
| 44 | 47 | } |
| 45 | 48 | return self::$get; |
| 46 | 49 | } |
| 47 | 50 | |
| 48 | - static function getPost($key = null) |
|
| 49 | - { |
|
| 51 | + static function getPost($key = null) |
|
| 52 | + {
|
|
| 50 | 53 | if($key) |
| 51 | 54 | { |
| 52 | - if(isset(self::$post[$key])) |
|
| 53 | - return self::$post[$key]; |
|
| 55 | + if(isset(self::$post[$key])) {
|
|
| 56 | + return self::$post[$key]; |
|
| 57 | + } |
|
| 54 | 58 | return false; |
| 55 | 59 | } |
| 56 | 60 | return self::$post; |
| 57 | 61 | } |
| 58 | 62 | |
| 59 | - public static function hasPost() |
|
| 60 | - { |
|
| 63 | + public static function hasPost() |
|
| 64 | + {
|
|
| 61 | 65 | return is_array(self::$post) && !empty(self::$post); |
| 62 | 66 | } |
| 63 | 67 | |
| 64 | - static function make_server() |
|
| 65 | - { |
|
| 68 | + static function make_server() |
|
| 69 | + {
|
|
| 66 | 70 | self::$server = $_SERVER; |
| 67 | 71 | } |
| 68 | 72 | |
| 69 | - static function make_get() |
|
| 70 | - { |
|
| 73 | + static function make_get() |
|
| 74 | + {
|
|
| 71 | 75 | self::$get = $_GET; |
| 72 | 76 | } |
| 73 | 77 | |
| 74 | - static function make_post() |
|
| 75 | - { |
|
| 78 | + static function make_post() |
|
| 79 | + {
|
|
| 76 | 80 | self::$post = $_POST; |
| 77 | 81 | } |
| 78 | 82 | |
@@ -4,5 +4,5 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface LogRepositoryInterface |
| 6 | 6 | { |
| 7 | - public function getActiveLogs($limit = null, $offset= 0); |
|
| 7 | + public function getActiveLogs($limit = null, $offset = 0); |
|
| 8 | 8 | } |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Jacobemerick\Web\Domain\Waterfall\Log; |
| 4 | 4 | |
| 5 | -interface LogRepositoryInterface |
|
| 6 | -{ |
|
| 5 | +interface LogRepositoryInterface |
|
| 6 | +{
|
|
| 7 | 7 | public function getActiveLogs($limit = null, $offset= 0); |
| 8 | 8 | } |
@@ -4,5 +4,5 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface WaterfallRepositoryInterface |
| 6 | 6 | { |
| 7 | - public function getWaterfalls($limit = null, $offset= 0); |
|
| 7 | + public function getWaterfalls($limit = null, $offset = 0); |
|
| 8 | 8 | } |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Jacobemerick\Web\Domain\Waterfall\Waterfall; |
| 4 | 4 | |
| 5 | -interface WaterfallRepositoryInterface |
|
| 6 | -{ |
|
| 5 | +interface WaterfallRepositoryInterface |
|
| 6 | +{
|
|
| 7 | 7 | public function getWaterfalls($limit = null, $offset= 0); |
| 8 | 8 | } |
@@ -39,20 +39,20 @@ discard block |
||
| 39 | 39 | public function perform() |
| 40 | 40 | { |
| 41 | 41 | $weighted_array = array(); |
| 42 | - foreach($this->result as $row) |
|
| 42 | + foreach ($this->result as $row) |
|
| 43 | 43 | { |
| 44 | 44 | $weight = $this->get_search_weight($row); |
| 45 | - if($weight > 0) |
|
| 45 | + if ($weight > 0) |
|
| 46 | 46 | $weighted_array[$row['id']] = $weight; |
| 47 | 47 | } |
| 48 | 48 | arsort($weighted_array); |
| 49 | 49 | |
| 50 | 50 | $final_array = array(); |
| 51 | - foreach($weighted_array as $id => $weight) |
|
| 51 | + foreach ($weighted_array as $id => $weight) |
|
| 52 | 52 | { |
| 53 | - foreach($this->result as $row) |
|
| 53 | + foreach ($this->result as $row) |
|
| 54 | 54 | { |
| 55 | - if($row['id'] == $id) |
|
| 55 | + if ($row['id'] == $id) |
|
| 56 | 56 | $final_array[] = $row; |
| 57 | 57 | } |
| 58 | 58 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | private function get_search_weight($row) |
| 63 | 63 | { |
| 64 | 64 | $weight = 0; |
| 65 | - foreach($this->weight as $weight_array) |
|
| 65 | + foreach ($this->weight as $weight_array) |
|
| 66 | 66 | { |
| 67 | 67 | $text = $row[$weight_array['field']]; |
| 68 | 68 | $weight += $weight_array['weight'] * substr_count(strtolower($text), strtolower($this->query)); |
@@ -3,71 +3,71 @@ |
||
| 3 | 3 | final class Search |
| 4 | 4 | { |
| 5 | 5 | |
| 6 | - private $query; |
|
| 7 | - private $result; |
|
| 8 | - private $weight; |
|
| 6 | + private $query; |
|
| 7 | + private $result; |
|
| 8 | + private $weight; |
|
| 9 | 9 | |
| 10 | - function __construct() |
|
| 11 | - { |
|
| 12 | - return $this; |
|
| 13 | - } |
|
| 10 | + function __construct() |
|
| 11 | + { |
|
| 12 | + return $this; |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | - public function setQuery($query) |
|
| 16 | - { |
|
| 17 | - $this->query = $query; |
|
| 18 | - return $this; |
|
| 19 | - } |
|
| 15 | + public function setQuery($query) |
|
| 16 | + { |
|
| 17 | + $this->query = $query; |
|
| 18 | + return $this; |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | - public function setResult($array) |
|
| 22 | - { |
|
| 23 | - $this->result = $array; |
|
| 24 | - return $this; |
|
| 25 | - } |
|
| 21 | + public function setResult($array) |
|
| 22 | + { |
|
| 23 | + $this->result = $array; |
|
| 24 | + return $this; |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function setWeight($weight) |
|
| 28 | - { |
|
| 29 | - $this->weight = $weight; |
|
| 30 | - return $this; |
|
| 31 | - } |
|
| 27 | + public function setWeight($weight) |
|
| 28 | + { |
|
| 29 | + $this->weight = $weight; |
|
| 30 | + return $this; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - public static function instance() |
|
| 34 | - { |
|
| 35 | - $reflection = new ReflectionClass('Search'); |
|
| 36 | - return $reflection->newInstance(); |
|
| 37 | - } |
|
| 33 | + public static function instance() |
|
| 34 | + { |
|
| 35 | + $reflection = new ReflectionClass('Search'); |
|
| 36 | + return $reflection->newInstance(); |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - public function perform() |
|
| 40 | - { |
|
| 41 | - $weighted_array = array(); |
|
| 42 | - foreach($this->result as $row) |
|
| 43 | - { |
|
| 44 | - $weight = $this->get_search_weight($row); |
|
| 45 | - if($weight > 0) |
|
| 46 | - $weighted_array[$row['id']] = $weight; |
|
| 47 | - } |
|
| 48 | - arsort($weighted_array); |
|
| 39 | + public function perform() |
|
| 40 | + { |
|
| 41 | + $weighted_array = array(); |
|
| 42 | + foreach($this->result as $row) |
|
| 43 | + { |
|
| 44 | + $weight = $this->get_search_weight($row); |
|
| 45 | + if($weight > 0) |
|
| 46 | + $weighted_array[$row['id']] = $weight; |
|
| 47 | + } |
|
| 48 | + arsort($weighted_array); |
|
| 49 | 49 | |
| 50 | - $final_array = array(); |
|
| 51 | - foreach($weighted_array as $id => $weight) |
|
| 52 | - { |
|
| 53 | - foreach($this->result as $row) |
|
| 54 | - { |
|
| 55 | - if($row['id'] == $id) |
|
| 56 | - $final_array[] = $row; |
|
| 57 | - } |
|
| 58 | - } |
|
| 59 | - return $final_array; |
|
| 60 | - } |
|
| 50 | + $final_array = array(); |
|
| 51 | + foreach($weighted_array as $id => $weight) |
|
| 52 | + { |
|
| 53 | + foreach($this->result as $row) |
|
| 54 | + { |
|
| 55 | + if($row['id'] == $id) |
|
| 56 | + $final_array[] = $row; |
|
| 57 | + } |
|
| 58 | + } |
|
| 59 | + return $final_array; |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - private function get_search_weight($row) |
|
| 63 | - { |
|
| 64 | - $weight = 0; |
|
| 65 | - foreach($this->weight as $weight_array) |
|
| 66 | - { |
|
| 67 | - $text = $row[$weight_array['field']]; |
|
| 68 | - $weight += $weight_array['weight'] * substr_count(strtolower($text), strtolower($this->query)); |
|
| 69 | - } |
|
| 70 | - return $weight; |
|
| 71 | - } |
|
| 62 | + private function get_search_weight($row) |
|
| 63 | + { |
|
| 64 | + $weight = 0; |
|
| 65 | + foreach($this->weight as $weight_array) |
|
| 66 | + { |
|
| 67 | + $text = $row[$weight_array['field']]; |
|
| 68 | + $weight += $weight_array['weight'] * substr_count(strtolower($text), strtolower($this->query)); |
|
| 69 | + } |
|
| 70 | + return $weight; |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | 73 | } |
@@ -1,49 +1,50 @@ discard block |
||
| 1 | 1 | <? |
| 2 | 2 | |
| 3 | -final class Search |
|
| 4 | -{ |
|
| 3 | +final class Search |
|
| 4 | +{
|
|
| 5 | 5 | |
| 6 | 6 | private $query; |
| 7 | 7 | private $result; |
| 8 | 8 | private $weight; |
| 9 | 9 | |
| 10 | - function __construct() |
|
| 11 | - { |
|
| 10 | + function __construct() |
|
| 11 | + {
|
|
| 12 | 12 | return $this; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | - public function setQuery($query) |
|
| 16 | - { |
|
| 15 | + public function setQuery($query) |
|
| 16 | + {
|
|
| 17 | 17 | $this->query = $query; |
| 18 | 18 | return $this; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - public function setResult($array) |
|
| 22 | - { |
|
| 21 | + public function setResult($array) |
|
| 22 | + {
|
|
| 23 | 23 | $this->result = $array; |
| 24 | 24 | return $this; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - public function setWeight($weight) |
|
| 28 | - { |
|
| 27 | + public function setWeight($weight) |
|
| 28 | + {
|
|
| 29 | 29 | $this->weight = $weight; |
| 30 | 30 | return $this; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - public static function instance() |
|
| 34 | - { |
|
| 33 | + public static function instance() |
|
| 34 | + {
|
|
| 35 | 35 | $reflection = new ReflectionClass('Search'); |
| 36 | 36 | return $reflection->newInstance(); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - public function perform() |
|
| 40 | - { |
|
| 39 | + public function perform() |
|
| 40 | + {
|
|
| 41 | 41 | $weighted_array = array(); |
| 42 | 42 | foreach($this->result as $row) |
| 43 | 43 | { |
| 44 | 44 | $weight = $this->get_search_weight($row); |
| 45 | - if($weight > 0) |
|
| 46 | - $weighted_array[$row['id']] = $weight; |
|
| 45 | + if($weight > 0) {
|
|
| 46 | + $weighted_array[$row['id']] = $weight; |
|
| 47 | + } |
|
| 47 | 48 | } |
| 48 | 49 | arsort($weighted_array); |
| 49 | 50 | |
@@ -52,15 +53,16 @@ discard block |
||
| 52 | 53 | { |
| 53 | 54 | foreach($this->result as $row) |
| 54 | 55 | { |
| 55 | - if($row['id'] == $id) |
|
| 56 | - $final_array[] = $row; |
|
| 56 | + if($row['id'] == $id) {
|
|
| 57 | + $final_array[] = $row; |
|
| 58 | + } |
|
| 57 | 59 | } |
| 58 | 60 | } |
| 59 | 61 | return $final_array; |
| 60 | 62 | } |
| 61 | 63 | |
| 62 | - private function get_search_weight($row) |
|
| 63 | - { |
|
| 64 | + private function get_search_weight($row) |
|
| 65 | + {
|
|
| 64 | 66 | $weight = 0; |
| 65 | 67 | foreach($this->weight as $weight_array) |
| 66 | 68 | { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | ], |
| 27 | 27 | ]; |
| 28 | 28 | |
| 29 | - return array_map(function ($row) { |
|
| 29 | + return array_map(function($row) { |
|
| 30 | 30 | return (object) $row; |
| 31 | 31 | }, $paths); |
| 32 | 32 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | ], |
| 49 | 49 | ]; |
| 50 | 50 | |
| 51 | - return array_map(function ($row) { |
|
| 51 | + return array_map(function($row) { |
|
| 52 | 52 | return (object) $row; |
| 53 | 53 | }, $paths); |
| 54 | 54 | } |
@@ -2,11 +2,11 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Loader::load('router', 'Router'); |
| 4 | 4 | |
| 5 | -class PortfolioRouter extends Router |
|
| 6 | -{ |
|
| 5 | +class PortfolioRouter extends Router |
|
| 6 | +{
|
|
| 7 | 7 | |
| 8 | - protected function get_redirect_array() |
|
| 9 | - { |
|
| 8 | + protected function get_redirect_array() |
|
| 9 | + {
|
|
| 10 | 10 | $paths = [ |
| 11 | 11 | [ |
| 12 | 12 | 'pattern' => '@/index.(html|htm|php)$@', |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | }, $paths); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - protected function get_direct_array() |
|
| 35 | - { |
|
| 34 | + protected function get_direct_array() |
|
| 35 | + {
|
|
| 36 | 36 | $paths = [ |
| 37 | 37 | [ |
| 38 | 38 | 'match' => '/', |
@@ -18,10 +18,10 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | private static function get_router_name() |
| 20 | 20 | { |
| 21 | - if(Request::isAJAX()) |
|
| 21 | + if (Request::isAJAX()) |
|
| 22 | 22 | return 'AJAXRouter'; |
| 23 | 23 | |
| 24 | - switch(URLDecode::getSite()) |
|
| 24 | + switch (URLDecode::getSite()) |
|
| 25 | 25 | { |
| 26 | 26 | case 'ajax' : |
| 27 | 27 | return 'AjaxRouter'; |
@@ -65,42 +65,42 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | final protected function check_for_redirect($redirect_uri) |
| 67 | 67 | { |
| 68 | - foreach($this->get_redirect_array() as $check) |
|
| 68 | + foreach ($this->get_redirect_array() as $check) |
|
| 69 | 69 | { |
| 70 | 70 | $redirect_uri = preg_replace($check->pattern, $check->replace, $redirect_uri); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $redirect_uri = $this->check_for_special_redirect($redirect_uri); |
| 74 | 74 | |
| 75 | - if($this->requires_trailing_slash() && substr($redirect_uri, -1) != '/') |
|
| 75 | + if ($this->requires_trailing_slash() && substr($redirect_uri, -1) != '/') |
|
| 76 | 76 | $redirect_uri .= '/'; |
| 77 | 77 | |
| 78 | 78 | if (URLDecode::getHost() == 'waterfalls.jacobemerick.com') { |
| 79 | 79 | $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; |
| 80 | - $redirect_uri = $protocol . '://' . (!Loader::isLive() ? 'dev' : 'www') . '.waterfallsofthekeweenaw.com' . $redirect_uri; |
|
| 80 | + $redirect_uri = $protocol.'://'.(!Loader::isLive() ? 'dev' : 'www').'.waterfallsofthekeweenaw.com'.$redirect_uri; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if($redirect_uri == URLDecode::getURI()) |
|
| 83 | + if ($redirect_uri == URLDecode::getURI()) |
|
| 84 | 84 | return; |
| 85 | 85 | |
| 86 | 86 | $controller_check = $redirect_uri; |
| 87 | - if(substr($redirect_uri, 0, 4) == 'http') { |
|
| 87 | + if (substr($redirect_uri, 0, 4) == 'http') { |
|
| 88 | 88 | $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; |
| 89 | - $controller_check = preg_replace('@^' . $protocol . '://([a-z\.]+)@', '', $redirect_uri); |
|
| 89 | + $controller_check = preg_replace('@^'.$protocol.'://([a-z\.]+)@', '', $redirect_uri); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $controller = $this->get_controller($controller_check); |
| 93 | - if($controller == '/Error404Controller') |
|
| 93 | + if ($controller == '/Error404Controller') |
|
| 94 | 94 | { |
| 95 | 95 | Loader::loadNew('controller', '/Error404Controller') |
| 96 | 96 | ->activate(); |
| 97 | 97 | exit; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - if(substr($redirect_uri, 0, 4) != 'http') |
|
| 100 | + if (substr($redirect_uri, 0, 4) != 'http') |
|
| 101 | 101 | { |
| 102 | 102 | $redirect_uri = substr($redirect_uri, 1); |
| 103 | - $redirect_uri = URLDecode::getBase() . $redirect_uri; |
|
| 103 | + $redirect_uri = URLDecode::getBase().$redirect_uri; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | Loader::loadNew('controller', '/Error301Controller', (array) $redirect_uri) |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | final private function get_controller($uri) |
| 116 | 116 | { |
| 117 | - foreach($this->get_direct_array() as $check) |
|
| 117 | + foreach ($this->get_direct_array() as $check) |
|
| 118 | 118 | { |
| 119 | - if($uri == $check->match) |
|
| 119 | + if ($uri == $check->match) |
|
| 120 | 120 | return "{$this->get_primary_folder()}/{$check->controller}"; |
| 121 | 121 | |
| 122 | - if(preg_match("@^{$check->match}$@", $uri)) |
|
| 122 | + if (preg_match("@^{$check->match}$@", $uri)) |
|
| 123 | 123 | return "{$this->get_primary_folder()}/{$check->controller}"; |
| 124 | 124 | } |
| 125 | 125 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | final private function get_primary_folder() |
| 130 | 130 | { |
| 131 | - if(Request::isAjax()) |
|
| 131 | + if (Request::isAjax()) |
|
| 132 | 132 | return 'ajax'; |
| 133 | 133 | |
| 134 | 134 | return URLDecode::getSite(); |
@@ -1,144 +1,144 @@ |
||
| 1 | 1 | <? |
| 2 | 2 | |
| 3 | 3 | Loader::load('utility', array( |
| 4 | - 'Request', |
|
| 5 | - 'URLDecode')); |
|
| 4 | + 'Request', |
|
| 5 | + 'URLDecode')); |
|
| 6 | 6 | |
| 7 | 7 | abstract class Router |
| 8 | 8 | { |
| 9 | 9 | |
| 10 | - public function __construct() {} |
|
| 10 | + public function __construct() {} |
|
| 11 | 11 | |
| 12 | - public static function instance() |
|
| 13 | - { |
|
| 14 | - $router_name = self::get_router_name(); |
|
| 15 | - $router = Loader::loadNew('router', $router_name); |
|
| 16 | - $router->route(); |
|
| 17 | - } |
|
| 12 | + public static function instance() |
|
| 13 | + { |
|
| 14 | + $router_name = self::get_router_name(); |
|
| 15 | + $router = Loader::loadNew('router', $router_name); |
|
| 16 | + $router->route(); |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - private static function get_router_name() |
|
| 20 | - { |
|
| 21 | - if(Request::isAJAX()) |
|
| 22 | - return 'AJAXRouter'; |
|
| 19 | + private static function get_router_name() |
|
| 20 | + { |
|
| 21 | + if(Request::isAJAX()) |
|
| 22 | + return 'AJAXRouter'; |
|
| 23 | 23 | |
| 24 | - switch(URLDecode::getSite()) |
|
| 25 | - { |
|
| 26 | - case 'ajax' : |
|
| 27 | - return 'AjaxRouter'; |
|
| 28 | - break; |
|
| 29 | - case 'blog' : |
|
| 30 | - return 'BlogRouter'; |
|
| 31 | - break; |
|
| 32 | - case 'home' : |
|
| 33 | - return 'HomeRouter'; |
|
| 34 | - break; |
|
| 35 | - case 'lifestream' : |
|
| 36 | - return 'LifestreamRouter'; |
|
| 37 | - break; |
|
| 38 | - case 'portfolio' : |
|
| 39 | - return 'PortfolioRouter'; |
|
| 40 | - break; |
|
| 41 | - case 'site' : |
|
| 42 | - return 'SiteRouter'; |
|
| 43 | - break; |
|
| 44 | - case 'waterfalls' : |
|
| 45 | - return 'WaterfallRouter'; |
|
| 46 | - break; |
|
| 47 | - } |
|
| 24 | + switch(URLDecode::getSite()) |
|
| 25 | + { |
|
| 26 | + case 'ajax' : |
|
| 27 | + return 'AjaxRouter'; |
|
| 28 | + break; |
|
| 29 | + case 'blog' : |
|
| 30 | + return 'BlogRouter'; |
|
| 31 | + break; |
|
| 32 | + case 'home' : |
|
| 33 | + return 'HomeRouter'; |
|
| 34 | + break; |
|
| 35 | + case 'lifestream' : |
|
| 36 | + return 'LifestreamRouter'; |
|
| 37 | + break; |
|
| 38 | + case 'portfolio' : |
|
| 39 | + return 'PortfolioRouter'; |
|
| 40 | + break; |
|
| 41 | + case 'site' : |
|
| 42 | + return 'SiteRouter'; |
|
| 43 | + break; |
|
| 44 | + case 'waterfalls' : |
|
| 45 | + return 'WaterfallRouter'; |
|
| 46 | + break; |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - Loader::loadNew('controller', '/Error404Controller')->activate(); |
|
| 50 | - } |
|
| 49 | + Loader::loadNew('controller', '/Error404Controller')->activate(); |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - protected function route() |
|
| 53 | - { |
|
| 54 | - $uri = URLDecode::getURI(); |
|
| 52 | + protected function route() |
|
| 53 | + { |
|
| 54 | + $uri = URLDecode::getURI(); |
|
| 55 | 55 | |
| 56 | - $this->check_for_redirect($uri); |
|
| 56 | + $this->check_for_redirect($uri); |
|
| 57 | 57 | |
| 58 | - $controller = $this->get_controller($uri); |
|
| 59 | - Loader::loadNew('controller', $controller) |
|
| 60 | - ->activate(); |
|
| 61 | - } |
|
| 58 | + $controller = $this->get_controller($uri); |
|
| 59 | + Loader::loadNew('controller', $controller) |
|
| 60 | + ->activate(); |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - abstract protected function get_redirect_array(); |
|
| 64 | - abstract protected function get_direct_array(); |
|
| 63 | + abstract protected function get_redirect_array(); |
|
| 64 | + abstract protected function get_direct_array(); |
|
| 65 | 65 | |
| 66 | - final protected function check_for_redirect($redirect_uri) |
|
| 67 | - { |
|
| 68 | - foreach($this->get_redirect_array() as $check) |
|
| 69 | - { |
|
| 70 | - $redirect_uri = preg_replace($check->pattern, $check->replace, $redirect_uri); |
|
| 71 | - } |
|
| 66 | + final protected function check_for_redirect($redirect_uri) |
|
| 67 | + { |
|
| 68 | + foreach($this->get_redirect_array() as $check) |
|
| 69 | + { |
|
| 70 | + $redirect_uri = preg_replace($check->pattern, $check->replace, $redirect_uri); |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - $redirect_uri = $this->check_for_special_redirect($redirect_uri); |
|
| 73 | + $redirect_uri = $this->check_for_special_redirect($redirect_uri); |
|
| 74 | 74 | |
| 75 | - if($this->requires_trailing_slash() && substr($redirect_uri, -1) != '/') |
|
| 76 | - $redirect_uri .= '/'; |
|
| 75 | + if($this->requires_trailing_slash() && substr($redirect_uri, -1) != '/') |
|
| 76 | + $redirect_uri .= '/'; |
|
| 77 | 77 | |
| 78 | 78 | if (URLDecode::getHost() == 'waterfalls.jacobemerick.com') { |
| 79 | 79 | $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; |
| 80 | 80 | $redirect_uri = $protocol . '://' . (!Loader::isLive() ? 'dev' : 'www') . '.waterfallsofthekeweenaw.com' . $redirect_uri; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if($redirect_uri == URLDecode::getURI()) |
|
| 84 | - return; |
|
| 83 | + if($redirect_uri == URLDecode::getURI()) |
|
| 84 | + return; |
|
| 85 | 85 | |
| 86 | - $controller_check = $redirect_uri; |
|
| 87 | - if(substr($redirect_uri, 0, 4) == 'http') { |
|
| 88 | - $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; |
|
| 89 | - $controller_check = preg_replace('@^' . $protocol . '://([a-z\.]+)@', '', $redirect_uri); |
|
| 86 | + $controller_check = $redirect_uri; |
|
| 87 | + if(substr($redirect_uri, 0, 4) == 'http') { |
|
| 88 | + $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; |
|
| 89 | + $controller_check = preg_replace('@^' . $protocol . '://([a-z\.]+)@', '', $redirect_uri); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - $controller = $this->get_controller($controller_check); |
|
| 93 | - if($controller == '/Error404Controller') |
|
| 94 | - { |
|
| 95 | - Loader::loadNew('controller', '/Error404Controller') |
|
| 96 | - ->activate(); |
|
| 97 | - exit; |
|
| 98 | - } |
|
| 92 | + $controller = $this->get_controller($controller_check); |
|
| 93 | + if($controller == '/Error404Controller') |
|
| 94 | + { |
|
| 95 | + Loader::loadNew('controller', '/Error404Controller') |
|
| 96 | + ->activate(); |
|
| 97 | + exit; |
|
| 98 | + } |
|
| 99 | 99 | |
| 100 | - if(substr($redirect_uri, 0, 4) != 'http') |
|
| 101 | - { |
|
| 102 | - $redirect_uri = substr($redirect_uri, 1); |
|
| 103 | - $redirect_uri = URLDecode::getBase() . $redirect_uri; |
|
| 104 | - } |
|
| 100 | + if(substr($redirect_uri, 0, 4) != 'http') |
|
| 101 | + { |
|
| 102 | + $redirect_uri = substr($redirect_uri, 1); |
|
| 103 | + $redirect_uri = URLDecode::getBase() . $redirect_uri; |
|
| 104 | + } |
|
| 105 | 105 | |
| 106 | - Loader::loadNew('controller', '/Error301Controller', (array) $redirect_uri) |
|
| 107 | - ->activate(); |
|
| 108 | - } |
|
| 106 | + Loader::loadNew('controller', '/Error301Controller', (array) $redirect_uri) |
|
| 107 | + ->activate(); |
|
| 108 | + } |
|
| 109 | 109 | |
| 110 | - protected function check_for_special_redirect($uri) |
|
| 111 | - { |
|
| 112 | - return $uri; |
|
| 113 | - } |
|
| 110 | + protected function check_for_special_redirect($uri) |
|
| 111 | + { |
|
| 112 | + return $uri; |
|
| 113 | + } |
|
| 114 | 114 | |
| 115 | - final private function get_controller($uri) |
|
| 116 | - { |
|
| 117 | - foreach($this->get_direct_array() as $check) |
|
| 118 | - { |
|
| 119 | - if($uri == $check->match) |
|
| 120 | - return "{$this->get_primary_folder()}/{$check->controller}"; |
|
| 115 | + final private function get_controller($uri) |
|
| 116 | + { |
|
| 117 | + foreach($this->get_direct_array() as $check) |
|
| 118 | + { |
|
| 119 | + if($uri == $check->match) |
|
| 120 | + return "{$this->get_primary_folder()}/{$check->controller}"; |
|
| 121 | 121 | |
| 122 | - if(preg_match("@^{$check->match}$@", $uri)) |
|
| 123 | - return "{$this->get_primary_folder()}/{$check->controller}"; |
|
| 124 | - } |
|
| 122 | + if(preg_match("@^{$check->match}$@", $uri)) |
|
| 123 | + return "{$this->get_primary_folder()}/{$check->controller}"; |
|
| 124 | + } |
|
| 125 | 125 | |
| 126 | - return '/Error404Controller'; |
|
| 127 | - } |
|
| 126 | + return '/Error404Controller'; |
|
| 127 | + } |
|
| 128 | 128 | |
| 129 | - final private function get_primary_folder() |
|
| 130 | - { |
|
| 131 | - if(Request::isAjax()) |
|
| 132 | - return 'ajax'; |
|
| 129 | + final private function get_primary_folder() |
|
| 130 | + { |
|
| 131 | + if(Request::isAjax()) |
|
| 132 | + return 'ajax'; |
|
| 133 | 133 | |
| 134 | - return URLDecode::getSite(); |
|
| 135 | - } |
|
| 134 | + return URLDecode::getSite(); |
|
| 135 | + } |
|
| 136 | 136 | |
| 137 | - private function requires_trailing_slash() |
|
| 138 | - { |
|
| 139 | - return ( |
|
| 140 | - URLDecode::getExtension() != 'json' && |
|
| 137 | + private function requires_trailing_slash() |
|
| 138 | + { |
|
| 139 | + return ( |
|
| 140 | + URLDecode::getExtension() != 'json' && |
|
| 141 | 141 | strstr(URLDecode::getURI(), '#') === false); |
| 142 | - } |
|
| 142 | + } |
|
| 143 | 143 | |
| 144 | 144 | } |
@@ -4,22 +4,25 @@ discard block |
||
| 4 | 4 | 'Request', |
| 5 | 5 | 'URLDecode')); |
| 6 | 6 | |
| 7 | -abstract class Router |
|
| 8 | -{ |
|
| 7 | +abstract class Router |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | - public function __construct() {} |
|
| 10 | + public function __construct() |
|
| 11 | + {
|
|
| 12 | +} |
|
| 11 | 13 | |
| 12 | - public static function instance() |
|
| 13 | - { |
|
| 14 | + public static function instance() |
|
| 15 | + {
|
|
| 14 | 16 | $router_name = self::get_router_name(); |
| 15 | 17 | $router = Loader::loadNew('router', $router_name); |
| 16 | 18 | $router->route(); |
| 17 | 19 | } |
| 18 | 20 | |
| 19 | - private static function get_router_name() |
|
| 20 | - { |
|
| 21 | - if(Request::isAJAX()) |
|
| 22 | - return 'AJAXRouter'; |
|
| 21 | + private static function get_router_name() |
|
| 22 | + {
|
|
| 23 | + if(Request::isAJAX()) {
|
|
| 24 | + return 'AJAXRouter'; |
|
| 25 | + } |
|
| 23 | 26 | |
| 24 | 27 | switch(URLDecode::getSite()) |
| 25 | 28 | { |
@@ -49,8 +52,8 @@ discard block |
||
| 49 | 52 | Loader::loadNew('controller', '/Error404Controller')->activate(); |
| 50 | 53 | } |
| 51 | 54 | |
| 52 | - protected function route() |
|
| 53 | - { |
|
| 55 | + protected function route() |
|
| 56 | + {
|
|
| 54 | 57 | $uri = URLDecode::getURI(); |
| 55 | 58 | |
| 56 | 59 | $this->check_for_redirect($uri); |
@@ -63,8 +66,8 @@ discard block |
||
| 63 | 66 | abstract protected function get_redirect_array(); |
| 64 | 67 | abstract protected function get_direct_array(); |
| 65 | 68 | |
| 66 | - final protected function check_for_redirect($redirect_uri) |
|
| 67 | - { |
|
| 69 | + final protected function check_for_redirect($redirect_uri) |
|
| 70 | + {
|
|
| 68 | 71 | foreach($this->get_redirect_array() as $check) |
| 69 | 72 | { |
| 70 | 73 | $redirect_uri = preg_replace($check->pattern, $check->replace, $redirect_uri); |
@@ -72,16 +75,18 @@ discard block |
||
| 72 | 75 | |
| 73 | 76 | $redirect_uri = $this->check_for_special_redirect($redirect_uri); |
| 74 | 77 | |
| 75 | - if($this->requires_trailing_slash() && substr($redirect_uri, -1) != '/') |
|
| 76 | - $redirect_uri .= '/'; |
|
| 78 | + if($this->requires_trailing_slash() && substr($redirect_uri, -1) != '/') {
|
|
| 79 | + $redirect_uri .= '/'; |
|
| 80 | + } |
|
| 77 | 81 | |
| 78 | 82 | if (URLDecode::getHost() == 'waterfalls.jacobemerick.com') { |
| 79 | 83 | $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; |
| 80 | 84 | $redirect_uri = $protocol . '://' . (!Loader::isLive() ? 'dev' : 'www') . '.waterfallsofthekeweenaw.com' . $redirect_uri; |
| 81 | 85 | } |
| 82 | 86 | |
| 83 | - if($redirect_uri == URLDecode::getURI()) |
|
| 84 | - return; |
|
| 87 | + if($redirect_uri == URLDecode::getURI()) {
|
|
| 88 | + return; |
|
| 89 | + } |
|
| 85 | 90 | |
| 86 | 91 | $controller_check = $redirect_uri; |
| 87 | 92 | if(substr($redirect_uri, 0, 4) == 'http') { |
@@ -107,35 +112,38 @@ discard block |
||
| 107 | 112 | ->activate(); |
| 108 | 113 | } |
| 109 | 114 | |
| 110 | - protected function check_for_special_redirect($uri) |
|
| 111 | - { |
|
| 115 | + protected function check_for_special_redirect($uri) |
|
| 116 | + {
|
|
| 112 | 117 | return $uri; |
| 113 | 118 | } |
| 114 | 119 | |
| 115 | - final private function get_controller($uri) |
|
| 116 | - { |
|
| 120 | + final private function get_controller($uri) |
|
| 121 | + {
|
|
| 117 | 122 | foreach($this->get_direct_array() as $check) |
| 118 | 123 | { |
| 119 | - if($uri == $check->match) |
|
| 120 | - return "{$this->get_primary_folder()}/{$check->controller}"; |
|
| 124 | + if($uri == $check->match) {
|
|
| 125 | + return "{$this->get_primary_folder()}/{$check->controller}";
|
|
| 126 | + } |
|
| 121 | 127 | |
| 122 | - if(preg_match("@^{$check->match}$@", $uri)) |
|
| 123 | - return "{$this->get_primary_folder()}/{$check->controller}"; |
|
| 128 | + if(preg_match("@^{$check->match}$@", $uri)) {
|
|
| 129 | + return "{$this->get_primary_folder()}/{$check->controller}";
|
|
| 130 | + } |
|
| 124 | 131 | } |
| 125 | 132 | |
| 126 | 133 | return '/Error404Controller'; |
| 127 | 134 | } |
| 128 | 135 | |
| 129 | - final private function get_primary_folder() |
|
| 130 | - { |
|
| 131 | - if(Request::isAjax()) |
|
| 132 | - return 'ajax'; |
|
| 136 | + final private function get_primary_folder() |
|
| 137 | + {
|
|
| 138 | + if(Request::isAjax()) {
|
|
| 139 | + return 'ajax'; |
|
| 140 | + } |
|
| 133 | 141 | |
| 134 | 142 | return URLDecode::getSite(); |
| 135 | 143 | } |
| 136 | 144 | |
| 137 | - private function requires_trailing_slash() |
|
| 138 | - { |
|
| 145 | + private function requires_trailing_slash() |
|
| 146 | + {
|
|
| 139 | 147 | return ( |
| 140 | 148 | URLDecode::getExtension() != 'json' && |
| 141 | 149 | strstr(URLDecode::getURI(), '#') === false); |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | $namespace = 'lifestream'; |
| 4 | -require_once __DIR__ . '/../../bootstrap.php'; |
|
| 4 | +require_once __DIR__.'/../../bootstrap.php'; |
|
| 5 | 5 | |
| 6 | 6 | // route |
| 7 | 7 | Loader::loadInstance('router', 'Router'); |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | $namespace = 'site'; |
| 4 | -require_once __DIR__ . '/../../bootstrap.php'; |
|
| 4 | +require_once __DIR__.'/../../bootstrap.php'; |
|
| 5 | 5 | |
| 6 | 6 | // route |
| 7 | 7 | Loader::loadInstance('router', 'Router'); |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | $namespace = 'waterfalls'; |
| 4 | -require_once __DIR__ . '/../../bootstrap.php'; |
|
| 4 | +require_once __DIR__.'/../../bootstrap.php'; |
|
| 5 | 5 | |
| 6 | 6 | // route |
| 7 | 7 | Loader::loadInstance('router', 'Router'); |