Lines Matching refs:base
58 * @param UriInterface $base Base URI
65 public static function resolve(UriInterface $base, UriInterface $rel) argument
69 return $base;
81 $targetAuthority = $base->getAuthority();
83 $targetPath = $base->getPath();
84 $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery();
89 if ($targetAuthority != '' && $base->getPath() === '') {
92 $lastSlashPos = strrpos($base->getPath(), '/');
96 … $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath();
106 $base->getScheme(),
135 * @param UriInterface $base Base URI
140 public static function relativize(UriInterface $base, UriInterface $target) argument
143 …($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthor…
155 if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) {
164 if ($base->getPath() !== $target->getPath()) {
165 return $emptyPathUri->withPath(self::getRelativePath($base, $target));
168 if ($base->getQuery() === $target->getQuery()) {
185 private static function getRelativePath(UriInterface $base, UriInterface $target) argument
187 $sourceSegments = explode('/', $base->getPath());
207 if ($base->getAuthority() != '' && $base->getPath() === '') {