Neos\Flow\Http\Uri::setPath PHP Метод

setPath() публичный Метод

Sets the path of the URI
public setPath ( string $path ) : void
$path string The path
Результат void
    public function setPath($path)
    {
        if (preg_match(self::PATTERN_MATCH_PATH, $path) === 1) {
            $this->path = $path;
        } else {
            throw new \InvalidArgumentException('"' . $path . '" is not valid path as part of a URI.', 1184071242);
        }
    }

Usage Example

Пример #1
0
 /**
  * Tries to detect the base URI of request.
  *
  * @return void
  */
 protected function detectBaseUri()
 {
     if ($this->baseUri === null) {
         $this->baseUri = clone $this->uri;
         $this->baseUri->setQuery(null);
         $this->baseUri->setFragment(null);
         $this->baseUri->setPath($this->getScriptRequestPath());
     }
 }