private function getPathInfo()
    {
        $requestURI = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';

        $this->validateRequestURI($requestURI);

        if (empty($requestURI)) {
            return;
        }

        $request = $requestURI;

        $this->fullRequest = $this->currentRequest = $request;
        $this->addDebugMessage("Full request " . $this->fullRequest);

        $secure = !empty($_SERVER['HTTPS']);
        $this->addDebugMessage($secure ? "Secure routing." : "Non-secure routing.");

        $this->baseHREF = "http" . ($secure ? 's' : '') . '://' . $_SERVER['SERVER_NAME'];

        $this->currentHREF = $this->baseHREF . $request;

        $queryStringIndex = strpos($request, '?');

        $startsWithSlash = ($request[0] == '/' ? 1 : 0);

        if ($queryStringIndex !== false) {
            $this->currentRequest = substr($request, 0, $queryStringIndex);

            $request = substr($request, $startsWithSlash, $queryStringIndex - 1);
        } else {
            $request = substr($request, $startsWithSlash);
        }

        if (!empty($request)) {
            $this->segments = explode('/', $request);
        }

        $this->isHomepage = (empty($request) || $request == '/');

        $this->checkForTrailingSlashRedirect();
    }
private function getPathInfo()
    {
        $requestURI = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';

        $this->validateRequestURI($requestURI);

        if (empty($requestURI)) {
            return;
        }

        $request = $requestURI;

        $this->fullRequest = $this->currentRequest = $request;
        $this->addDebugMessage("Full request " . $this->fullRequest);

        $secure = !empty($_SERVER['HTTPS']);
        $this->addDebugMessage($secure ? "Secure routing." : "Non-secure routing.");

        $this->baseHREF = "http" . ($secure ? 's' : '') . '://' . $_SERVER['SERVER_NAME'];

        $this->currentHREF = $this->baseHREF . $request;

        $queryStringIndex = strpos($request, '?');

        $startsWithSlash = ($request[0] == '/' ? 1 : 0);

        if ($queryStringIndex !== false) {
            $this->currentRequest = substr($request, 0, $queryStringIndex);

            $request = substr($request, $startsWithSlash, $queryStringIndex - 1);
        } else {
            $request = substr($request, $startsWithSlash);
        }

        if (!empty($request)) {
            $this->segments = explode('/', $request);
        }

        $this->isHomepage = (empty($request) || $request == '/');

        $this->checkForTrailingSlashRedirect();
    }
private function getPathInfo ( ) { $ requestURI = ! empty ( $ _SERVER [ 'REQUEST_URI' ] ) ? $ _SERVER [ 'REQUEST_URI' ] : '' ; $ this -> validateRequestURI ( $ requestURI ) ; if ( empty ( $ requestURI ) ) { return ; } $ request = $ requestURI ; $ this -> fullRequest = $ this -> currentRequest = $ request ; $ this -> addDebugMessage ( "Full request " . $ this -> fullRequest ) ; $ secure = ! empty ( $ _SERVER [ 'HTTPS' ] ) ; $ this -> addDebugMessage ( $ secure ? "Secure routing." : "Non-secure routing." ) ; $ this -> baseHREF = "http" . ( $ secure ? 's' : '' ) . '://' . $ _SERVER [ 'SERVER_NAME' ] ; $ this -> currentHREF = $ this -> baseHREF . $ request ; $ queryStringIndex = strpos ( $ request , '?' ) ; $ startsWithSlash = ( $ request [ 0 ] == '/' ? 1 : 0 ) ; if ( $ queryStringIndex !== false ) { $ this -> currentRequest = substr ( $ request , 0 , $ queryStringIndex ) ; $ request = substr ( $ request , $ startsWithSlash , $ queryStringIndex - 1 ) ; } else { $ request = substr ( $ request , $ startsWithSlash ) ; } if ( ! empty ( $ request ) ) { $ this -> segments = explode ( '/' , $ request ) ; } $ this -> isHomepage = ( empty ( $ request ) || $ request == '/' ) ; $ this -> checkForTrailingSlashRedirect ( ) ; }
Gets the path info and parses out the segment structure
Gets the path info and parses out the segment structure