protected function getCachePathFromWebRoot($subdir = null)
    {
        $cache_dir_from_web_root = $this->getCacheDirFromWebRoot();

        if ($subdir != null) {
            $safe_subdir = basename($subdir);

            $path = sprintf("%s/%s", $cache_dir_from_web_root, $safe_subdir);
        } else {
            $path = $cache_dir_from_web_root;
        }

        // Check if path is valid, e.g. in the cache dir
        return $path;
    }
protected function getCachePathFromWebRoot($subdir = null)
    {
        $cache_dir_from_web_root = $this->getCacheDirFromWebRoot();

        if ($subdir != null) {
            $safe_subdir = basename($subdir);

            $path = sprintf("%s/%s", $cache_dir_from_web_root, $safe_subdir);
        } else {
            $path = $cache_dir_from_web_root;
        }

        // Check if path is valid, e.g. in the cache dir
        return $path;
    }
protected function getCachePathFromWebRoot ( $ subdir = null ) { $ cache_dir_from_web_root = $ this -> getCacheDirFromWebRoot ( ) ; if ( $ subdir != null ) { $ safe_subdir = basename ( $ subdir ) ; $ path = sprintf ( "%s/%s" , $ cache_dir_from_web_root , $ safe_subdir ) ; } else { $ path = $ cache_dir_from_web_root ; } // Check if path is valid, e.g. in the cache dir return $ path ; }
Return the cache directory path relative to Web Root

@param  string $subdir the subdirectory related to cache base, or null to get the cache directory only.
@return string the cache directory path relative to Web Root
Return the cache directory path relative to Web Root