/** * {@inheritdoc} */ public function sameValueAs(Interfaces\UrlPart $component) { return $component->getUriComponent() === $this->getUriComponent(); }
/** * Format a League\Url\Interfaces\UrlPart according to the Formatter properties * * @param Interfaces\UrlPart $part * * @return string */ protected function formatUrlPart(Interfaces\UrlPart $part) { if ($part instanceof Interfaces\Query) { return Query::build($part->toArray(), $this->querySeparator, $this->queryEncoding); } if ($part instanceof Interfaces\Host) { return $this->formatHost($part); } return $part->__toString(); }