コード例 #1
0
ファイル: Formatter.php プロジェクト: barryvdh/uri
 /**
  * Format a Host according to the Formatter properties
  *
  * @param HostInterface $host
  *
  * @return string
  */
 protected function formatHost(HostInterface $host)
 {
     if (self::HOST_AS_ASCII == $this->hostEncoding) {
         return $host->toAscii()->__toString();
     }
     return $host->toUnicode()->__toString();
 }
コード例 #2
0
ファイル: PartialModifier.php プロジェクト: BauRo/url
 /**
  * {@inheritdoc}
  */
 public function toAscii()
 {
     return $this->withProperty('host', $this->host->toAscii());
 }