예제 #1
0
파일: Formatter.php 프로젝트: barryvdh/uri
 /**
  * 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();
 }
예제 #2
0
파일: UserInfo.php 프로젝트: barryvdh/uri
 /**
  * @inheritdoc
  */
 public function sameValueAs(UriPart $component)
 {
     return $this->getUriComponent() === $component->getUriComponent();
 }
예제 #3
0
파일: Formatter.php 프로젝트: BauRo/url
 /**
  * Format a League\Uri\Interfaces\UriPart according to the Formatter properties
  *
  * @param Interfaces\UriPart $part
  *
  * @return string
  */
 protected function formatUriPart(Interfaces\UriPart $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();
 }