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); } }
/** * 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()); } }