Development

- Added new Redirect method to SimpleRouter class.
- Changed method-names in InputHandler for better description.
- Fixed return-types for InputHandler for collections.
- Added unit-tests for InputHandler (get, post).
- Optimisations.
This commit is contained in:
Simon Sessingø
2018-04-06 17:20:00 +02:00
parent 30a2ddeed9
commit d38f81836d
15 changed files with 706 additions and 528 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ class Request
$this->setUrl(new Url($this->getHeader('unencoded-url', $this->getHeader('request-uri'))));
$this->inputHandler = new InputHandler($this);
$this->method = strtolower($this->inputHandler->getValue('_method', $this->getHeader('request-method')));
$this->method = strtolower($this->inputHandler->value('_method', $this->getHeader('request-method')));
}
public function isSecure(): bool
@@ -279,7 +279,7 @@ class Request
*/
public function setMethod(string $method): void
{
$this->method = $method;
$this->method = strtolower($method);
}
/**