コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function sameValueAs(Interfaces\UrlPart $component)
 {
     return $component->getUriComponent() === $this->getUriComponent();
 }
コード例 #2
0
ファイル: Formatter.php プロジェクト: sknilkcabrotinom/url
 /**
  * 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();
 }