protected function _fixUrlForParsing($url)
    {
        $path = $url->path;

        //bug in request
        if ($url->format == 'php') {
            $path .= '.php';
            $url->format = null;
        }

        $path = substr_replace($path, '', 0, strlen($this->_base_url->path));
        $path = preg_replace('/index\/?.php/', '', $path);
        $path = trim($path, '/');

        $url->path = $path;
        $url->format = $url->format ? $url->format : pick(AnRequest::format(), 'html');

        if (! empty($url->format)) {
            $url->query['format'] = $url->format;
        }
    }
protected function _fixUrlForParsing($url)
    {
        $path = $url->path;

        //bug in request
        if ($url->format == 'php') {
            $path .= '.php';
            $url->format = null;
        }

        $path = substr_replace($path, '', 0, strlen($this->_base_url->path));
        $path = preg_replace('/index\/?.php/', '', $path);
        $path = trim($path, '/');

        $url->path = $path;
        $url->format = $url->format ? $url->format : pick(AnRequest::format(), 'html');

        if (! empty($url->format)) {
            $url->query['format'] = $url->format;
        }
    }
protected function _fixUrlForParsing ( $ url ) { $ path = $ url -> path ; //bug in request if ( $ url -> format == 'php' ) { $ path .= '.php' ; $ url -> format = null ; } $ path = substr_replace ( $ path , '' , 0 , strlen ( $ this -> _base_url -> path ) ) ; $ path = preg_replace ( '/index\/?.php/' , '' , $ path ) ; $ path = trim ( $ path , '/' ) ; $ url -> path = $ path ; $ url -> format = $ url -> format ? $ url -> format : pick ( AnRequest :: format ( ) , 'html' ) ; if ( ! empty ( $ url -> format ) ) { $ url -> query [ 'format' ] = $ url -> format ; } }
Fixes the url path.

@param AnHttpUrl $url
Fixes the url path .