Change request string from hash to url

This commit is contained in:
Dennis Eichhorn 2017-10-07 17:14:50 +02:00
parent 663bdca316
commit 464c2e339c

View File

@ -75,7 +75,7 @@ class Request extends RequestAbstract
public function __construct(Localization $l11n = null, UriInterface $uri = null) public function __construct(Localization $l11n = null, UriInterface $uri = null)
{ {
$this->header = new Header(); $this->header = new Header();
$this->header->setL11n($l11n); $this->header->setL11n($l11n ?? new Localization());
$this->uri = $uri; $this->uri = $uri;
$this->source = RequestSource::WEB; $this->source = RequestSource::WEB;
@ -209,7 +209,7 @@ class Request extends RequestAbstract
*/ */
public function setUri(UriInterface $uri) /* : void */ public function setUri(UriInterface $uri) /* : void */
{ {
$this->uri = $uri; parent::setUri($uri);
$this->data += $uri->getQueryArray(); $this->data += $uri->getQueryArray();
} }
@ -379,21 +379,6 @@ class Request extends RequestAbstract
|| ($_SERVER['SERVER_PORT'] ?? '') == $port; || ($_SERVER['SERVER_PORT'] ?? '') == $port;
} }
/**
* Stringify request.
*
* @return string
*
* @since 1.0.0
*/
public function __toString()
{
$lastElement = end($this->hash);
reset($this->hash);
return $lastElement;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */