Symfony\Component\HttpFoundation\Request::getUri PHP Метод

getUri() публичный метод

Generates a normalized URI (URL) for the Request.
См. также: getQueryString()
public getUri ( ) : string
Результат string A normalized URI (URL) for the Request
    public function getUri()
    {
        if (null !== $qs = $this->getQueryString()) {
            $qs = '?'.$qs;
        }

        return $this->getSchemeAndHttpHost().$this->getBaseUrl().$this->getPathInfo().$qs;
    }

Usage Example

 /**
  * Creates and persists a thread with the specified id.
  *
  * @param mixed $id
  * @return ThreadInterface
  */
 public function create($id)
 {
     $thread = $this->threadManager->createThread();
     $thread->setId($id);
     $thread->setPermalink($this->request->getUri());
     $this->threadManager->addThread($thread);
     return $thread;
 }
All Usage Examples Of Symfony\Component\HttpFoundation\Request::getUri