protected function getCurrentPathRelativeToBase($path = null)
    {
        if (!$path) {
            // using $_SERVER instead of using Request method
            // to get original request path instead of any forwarded request
            $path = $_SERVER['REQUEST_URI'];
        }
        $base_path = $this->app['request']->getBasePath();
        return substr(strtok($path, '?'), strlen($base_path));
    }
protected function getCurrentPathRelativeToBase($path = null)
    {
        if (!$path) {
            // using $_SERVER instead of using Request method
            // to get original request path instead of any forwarded request
            $path = $_SERVER['REQUEST_URI'];
        }
        $base_path = $this->app['request']->getBasePath();
        return substr(strtok($path, '?'), strlen($base_path));
    }
protected function getCurrentPathRelativeToBase ( $ path = null ) { if ( ! $ path ) { // using $_SERVER instead of using Request method // to get original request path instead of any forwarded request $ path = $ _SERVER [ 'REQUEST_URI' ] ; } $ base_path = $ this -> app [ 'request' ] -> getBasePath ( ) ; return substr ( strtok ( $ path , '?' ) , strlen ( $ base_path ) ) ; }
Get current path relative to base path.
@param string $path Path to process. Optional, default to current path
@return string
Get current path relative to base path .