mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-10-13 15:29:20 +00:00
Development
- all() in Input class now returns correct array. - all() now supports json data. - Minor bugfixes.
This commit is contained in:
@@ -5,8 +5,21 @@ use Pecee\Http\Input\Input;
|
||||
|
||||
class Request {
|
||||
|
||||
protected static $instance;
|
||||
|
||||
protected $data;
|
||||
|
||||
/**
|
||||
* Return new instance
|
||||
* @return static
|
||||
*/
|
||||
public static function getInstance() {
|
||||
if(self::$instance === null) {
|
||||
self::$instance = new static();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
$this->data = array();
|
||||
$this->host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : array();
|
||||
|
||||
Reference in New Issue
Block a user