src/Cortex/Uri/PsrUri.php
private function marshallFromServer()
    {
        $scheme = is_ssl() ? 'https' : 'http';

        $host = $this->marshallHostFromServer() ? : parse_url(home_url(), PHP_URL_HOST);
        $host = trim($host, '/');

        $pathArray = explode('?', $this->marshallPathFromServer(), 2);
        $path = trim($pathArray[0], '/');

        empty($path) and $path = '/';

        $query_string = '';
        if (isset($this->server['QUERY_STRING'])) {
            $query_string = ltrim($this->server['QUERY_STRING'], '?');
        }

        $this->storage = compact('scheme', 'host', 'path', 'query_string');
        $this->parsed = true;
    }
private function marshallFromServer()
    {
        $scheme = is_ssl() ? 'https' : 'http';

        $host = $this->marshallHostFromServer() ? : parse_url(home_url(), PHP_URL_HOST);
        $host = trim($host, '/');

        $pathArray = explode('?', $this->marshallPathFromServer(), 2);
        $path = trim($pathArray[0], '/');

        empty($path) and $path = '/';

        $query_string = '';
        if (isset($this->server['QUERY_STRING'])) {
            $query_string = ltrim($this->server['QUERY_STRING'], '?');
        }

        $this->storage = compact('scheme', 'host', 'path', 'query_string');
        $this->parsed = true;
    }
private function marshallFromServer ( ) { $ scheme = is_ssl ( ) ? 'https' : 'http' ; $ host = $ this -> marshallHostFromServer ( ) ? : parse_url ( home_url ( ) , PHP_URL_HOST ) ; $ host = trim ( $ host , '/' ) ; $ pathArray = explode ( '?' , $ this -> marshallPathFromServer ( ) , 2 ) ; $ path = trim ( $ pathArray [ 0 ] , '/' ) ; empty ( $ path ) and $ path = '/' ; $ query_string = '' ; if ( isset ( $ this -> server [ 'QUERY_STRING' ] ) ) { $ query_string = ltrim ( $ this -> server [ 'QUERY_STRING' ] , '?' ) ; } $ this -> storage = compact ( 'scheme' , 'host' , 'path' , 'query_string' ) ; $ this -> parsed = true ; }
Parse server array to find url components.
Parse server array to find url components .