Ejemplo n.º 1
0
 /**
  * Format a URI authority according to the Formatter properties
  *
  * @param Uri $uri
  *
  * @return string
  */
 protected function formatAuthority(Uri $uri)
 {
     if ('' == $uri->getHost()) {
         return '';
     }
     $components = $uri->toArray();
     $port = $components['port'];
     if (!empty($port)) {
         $port = ':' . $port;
     }
     return '//' . $this->uriParser->BuildUserInfo($components['user'], $components['pass']) . $this->formatHost(new Host($components['host'])) . $port;
 }