Esempio n. 1
0
 /**
  * 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);
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function sameValueAs(Interfaces\SchemeRegistry $schemeRegistry)
 {
     return $this->toArray() === $schemeRegistry->toArray();
 }