Skip to content

Commit 93dcc8a

Browse files
authored
Update Router.php
1 parent c3192b2 commit 93dcc8a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Router.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @copyright 2016 Bill Rocha <http://google.com/+BillRocha>
1010
* @license <https://opensource.org/licenses/MIT> MIT
1111
* @version GIT: 0.0.1
12-
* @link http://dbrasil.tk/devbr
12+
* @link https://github.com/devbr
1313
*/
1414
namespace Devbr;
1515

@@ -20,15 +20,15 @@
2020
* @package Librarys
2121
* @author Bill Rocha <prbr@ymail.com>
2222
* @license <https://opensource.org/licenses/MIT> MIT
23-
* @link http://dbrasil.tk/devbr
23+
* @link https://github.com/devbr
2424
*/
2525
class Router
2626
{
2727
private $autorun = true;
28-
private $url = '';
28+
private $url = false;
2929
private $http = '';
3030
private $base = '';
31-
private $request = '';
31+
private $request = false;
3232
private $routers = [];
3333
private $params = [];
3434
private $all = [];
@@ -154,11 +154,11 @@ function __construct(
154154
}
155155

156156
if ($request !== null) {
157-
$this->request;
157+
$this->request = $request;
158158
}
159159

160160
if ($url !== null) {
161-
$this->url;
161+
$this->url = $url;
162162
}
163163

164164
$this->method = $this->requestMethod();
@@ -344,15 +344,15 @@ private function mount()
344344
}
345345

346346
//URL & REQST Constants:
347-
if(!$this->request) {
347+
if($this->request === false) {
348348
$this->request = urldecode(isset($_SERVER['REQUEST_URI']) ? urldecode(trim(str_replace($this->base, '', trim($_SERVER['REQUEST_URI'])), ' /')) : '');
349349
}
350350
defined('_RQST') || define('_RQST', $this->request);
351351

352-
if($this->url) {
352+
if($this->url === false) {
353353
$this->url = isset($_SERVER['SERVER_NAME']) ? $this->http . $_SERVER['SERVER_NAME'] . $this->base . '/' : '';
354354
}
355-
defined('_URL') || define('_URL', $this->request);
355+
defined('_URL') || define('_URL', $this->url);
356356

357357
//Load configurations
358358
$this->loadConfig();

0 commit comments

Comments
 (0)