Lines Matching defs:base
256 * Returns false if $base is not absolute, otherwise an IRI.
258 * @param IRI|string $base (Absolute) Base IRI
262 public static function absolutize($base, $relative)
272 if (!($base instanceof IRI)) {
273 $base = new IRI($base);
275 if ($base->scheme !== null && $base->is_valid()) {
279 $target->scheme = $base->scheme;
282 $target->scheme = $base->scheme;
283 $target->iuserinfo = $base->iuserinfo;
284 $target->ihost = $base->ihost;
285 $target->port = $base->port;
289 } elseif (($base->iuserinfo !== null || $base->ihost !== null || $base->port !== null) && $base->ipath === '') {
291 } elseif (($last_segment = strrpos($base->ipath, '/')) !== false) {
292 $target->ipath = substr($base->ipath, 0, $last_segment + 1) . $relative->ipath;
299 $target->ipath = $base->ipath;
302 } elseif ($base->iquery !== null) {
303 $target->iquery = $base->iquery;
309 $target = clone $base;