You are here

private function RequestTrait::getHostFromUri in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-diactoros/src/RequestTrait.php \Zend\Diactoros\RequestTrait::getHostFromUri()

Retrieve the host from the URI instance

Return value

string

File

vendor/zendframework/zend-diactoros/src/RequestTrait.php, line 289

Class

RequestTrait
Trait with common request behaviors.

Namespace

Zend\Diactoros

Code

private function getHostFromUri() {
  $host = $this->uri
    ->getHost();
  $host .= $this->uri
    ->getPort() ? ':' . $this->uri
    ->getPort() : '';
  return $host;
}