mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-24 03:59:16 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2db20dce6b | |||
| f2d106c649 | |||
| c6341960d7 | |||
| 72d33dd497 | |||
| e23dd37435 | |||
| aa5ec47051 |
@@ -36,7 +36,7 @@ class Request
|
||||
$this->setUri(new Uri($this->getHeader('unencoded-url', $this->getHeader('request-uri'))));
|
||||
|
||||
$this->input = new Input($this);
|
||||
$this->method = strtolower($this->input->get('_method', $this->getHeader('request-method'), 'post'));
|
||||
$this->method = strtolower($this->input->get('_method', $this->getHeader('request-method')));
|
||||
}
|
||||
|
||||
protected function parseHeaders()
|
||||
@@ -196,10 +196,14 @@ class Request
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Uri $uri
|
||||
* @param Uri|string $uri
|
||||
*/
|
||||
public function setUri(Uri $uri)
|
||||
public function setUri($uri)
|
||||
{
|
||||
if (is_string($uri) === true) {
|
||||
$uri = new Uri($uri);
|
||||
}
|
||||
|
||||
$this->uri = $uri;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user