Lines Matching refs:target
128 public static function relativize(UriInterface $base, UriInterface $target): UriInterface argument
130 if ($target->getScheme() !== ''
131 …&& ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAut…
133 return $target;
136 if (Uri::isRelativePathReference($target)) {
140 return $target;
143 if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) {
144 return $target->withScheme('');
150 …$emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(…
152 if ($base->getPath() !== $target->getPath()) {
153 return $emptyPathUri->withPath(self::getRelativePath($base, $target));
156 if ($base->getQuery() === $target->getQuery()) {
163 if ($target->getQuery() === '') {
164 $segments = explode('/', $target->getPath());
174 private static function getRelativePath(UriInterface $base, UriInterface $target): string argument
177 $targetSegments = explode('/', $target->getPath());