public getRequestTarget ( ) : string | ||
return | string |
public function getRequestTarget()
{
if (null !== $this->requestTarget) {
return $this->requestTarget;
}
if (!$this->uri) {
return '/';
}
$target = $this->uri->getPath();
if ($this->uri->getQuery()) {
$target .= '?' . $this->uri->getQuery();
}
if (empty($target)) {
$target = '/';
}
return $target;
}