Lines Matching refs:target
136 * @param UriInterface $target Target URI
140 public static function relativize(UriInterface $base, UriInterface $target) argument
142 if ($target->getScheme() !== '' &&
143 …($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthor…
145 return $target;
148 if (Uri::isRelativePathReference($target)) {
152 return $target;
155 if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) {
156 return $target->withScheme('');
162 …$emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(…
164 if ($base->getPath() !== $target->getPath()) {
165 return $emptyPathUri->withPath(self::getRelativePath($base, $target));
168 if ($base->getQuery() === $target->getQuery()) {
175 if ($target->getQuery() === '') {
176 $segments = explode('/', $target->getPath());
185 private static function getRelativePath(UriInterface $base, UriInterface $target) argument
188 $targetSegments = explode('/', $target->getPath());