/** * returns the resolve URL according to the authority * * @param Interfaces\Uri $relative the relative URL * * @return Interfaces\Uri */ protected function resolveAuthority(Interfaces\Uri $relative) { if (!$relative->schemeRegistry->hasKey($this->scheme)) { $schemeRegistry = $relative->schemeRegistry->merge([$this->scheme->__toString() => $this->schemeRegistry->getPort($this->scheme)]); $relative = $relative->withSchemeRegistry($schemeRegistry); } return $relative->withScheme($this->scheme); }
/** * {@inheritdoc} */ public function sameValueAs(Interfaces\SchemeRegistry $schemeRegistry) { return $this->toArray() === $schemeRegistry->toArray(); }