Development

- all() in Input class now returns correct array.
- all() now supports json data.
- Minor bugfixes.
This commit is contained in:
Simon Sessingø
2016-11-08 18:21:21 +02:00
parent 540ebb31ac
commit 28ffa30d3e
2 changed files with 45 additions and 20 deletions
+13
View File
@@ -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();