Lines Matching refs:base
58 public static function resolve(UriInterface $base, UriInterface $rel): UriInterface argument
62 return $base;
74 $targetAuthority = $base->getAuthority();
76 $targetPath = $base->getPath();
77 $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery();
82 if ($targetAuthority != '' && $base->getPath() === '') {
85 $lastSlashPos = strrpos($base->getPath(), '/');
89 … $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1).$rel->getPath();
99 $base->getScheme(),
128 public static function relativize(UriInterface $base, UriInterface $target): UriInterface argument
131 …&& ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAut…
143 if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) {
152 if ($base->getPath() !== $target->getPath()) {
153 return $emptyPathUri->withPath(self::getRelativePath($base, $target));
156 if ($base->getQuery() === $target->getQuery()) {
174 private static function getRelativePath(UriInterface $base, UriInterface $target): string argument
176 $sourceSegments = explode('/', $base->getPath());
196 if ($base->getAuthority() != '' && $base->getPath() === '') {