Symfony\Component\HttpFoundation\Request::getRequestUri PHP Method

getRequestUri() public method

Returns the requested URI (path and query string).
public getRequestUri ( ) : string
return string The raw URI (i.e. not URI decoded)
    public function getRequestUri()
    {
        if (null === $this->requestUri) {
            $this->requestUri = $this->prepareRequestUri();
        }

        return $this->requestUri;
    }

Usage Example

 /**
  * @return string
  */
 public function getRequestUri()
 {
     if (null === $this->request) {
         throw new \LogicException('No Request set for RequestUriProviderByListener. Do not use this service manually.');
     }
     return $this->request->getRequestUri();
 }
All Usage Examples Of Symfony\Component\HttpFoundation\Request::getRequestUri