forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
711 B
39 lines
711 B
<?php |
|
|
|
namespace app\Middleware; |
|
|
|
/** |
|
* Description of Http |
|
* |
|
* @author Lucas Awade |
|
*/ |
|
class Http |
|
{ |
|
|
|
private $url; |
|
private $param; |
|
|
|
const CONF_PAGE = 'index.php'; |
|
|
|
public function __construct() |
|
{ |
|
$this->baseUri(); |
|
} |
|
|
|
public function param() |
|
{ |
|
return $this->param; |
|
} |
|
|
|
public function baseUri() |
|
{ |
|
$this->url = explode(self::CONF_PAGE, $_SERVER['PHP_SELF']); |
|
$this->url = end($this->url); |
|
if ($this->url) { |
|
$this->url = explode("/", $this->url); |
|
if (isset($this->url[0])) { |
|
$this->param = array_filter($this->url); |
|
} |
|
} |
|
} |
|
}
|
|
|