/**
  * {@inheritdoc}
  */
 public function sameValueAs(UriPart $component)
 {
     return $component->getUriComponent() === $this->getUriComponent();
 }
Exemple #2
0
 /**
  * Format a UriPart implemented object according to the Formatter properties
  *
  * @param UriPart $part
  *
  * @return string
  */
 protected function formatUriPart(UriPart $part)
 {
     if ($part instanceof QueryInterface) {
         return $this->queryParser->build($part->toArray(), $this->querySeparator, $this->queryEncoding);
     }
     if ($part instanceof HostInterface) {
         return $this->formatHost($part);
     }
     return $part->__toString();
 }