src/Cortex/Uri/PsrUri.php
private function marshallHostFromServer()
    {
        $host = isset($this->server['HTTP_HOST']) ? $this->server['HTTP_HOST'] : '';
        if (empty($host)) {
            return isset($this->server['SERVER_NAME']) ? $this->server['SERVER_NAME'] : '';
        }

        if (is_string($host) && preg_match('|\:(\d+)$|', $host, $matches)) {
            $host = substr($host, 0, -1 * (strlen($matches[1]) + 1));
        }

        return $host;
    }
private function marshallHostFromServer()
    {
        $host = isset($this->server['HTTP_HOST']) ? $this->server['HTTP_HOST'] : '';
        if (empty($host)) {
            return isset($this->server['SERVER_NAME']) ? $this->server['SERVER_NAME'] : '';
        }

        if (is_string($host) && preg_match('|\:(\d+)$|', $host, $matches)) {
            $host = substr($host, 0, -1 * (strlen($matches[1]) + 1));
        }

        return $host;
    }
private function marshallHostFromServer ( ) { $ host = isset ( $ this -> server [ 'HTTP_HOST' ] ) ? $ this -> server [ 'HTTP_HOST' ] : '' ; if ( empty ( $ host ) ) { return isset ( $ this -> server [ 'SERVER_NAME' ] ) ? $ this -> server [ 'SERVER_NAME' ] : '' ; } if ( is_string ( $ host ) && preg_match ( '|\:(\d+)$|' , $ host , $ matches ) ) { $ host = substr ( $ host , 0 , - 1 * ( strlen ( $ matches [ 1 ] ) + 1 ) ) ; } return $ host ; }
Parse server array to find url host.

Contains code from Zend\Diactoros\ServerRequestFactory

@copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com)
@license   https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD
License

@return string
Parse server array to find url host .