protected function _relativizePath($path)
    {
        $plugins = Plugin::loaded();
        $index = array_search('AssetCompress', $plugins);
        unset($plugins[$index]);

        foreach ($plugins as $plugin) {
            $pluginPath = Plugin::path($plugin) . 'webroot';
            if (strpos($path, $pluginPath) === 0) {
                return str_replace($pluginPath, '/' . Inflector::underscore($plugin), $path);
            }
        }
        $path = str_replace(WWW_ROOT, '/', $path);

        return str_replace(DS, '/', $path);
    }
protected function _relativizePath($path)
    {
        $plugins = Plugin::loaded();
        $index = array_search('AssetCompress', $plugins);
        unset($plugins[$index]);

        foreach ($plugins as $plugin) {
            $pluginPath = Plugin::path($plugin) . 'webroot';
            if (strpos($path, $pluginPath) === 0) {
                return str_replace($pluginPath, '/' . Inflector::underscore($plugin), $path);
            }
        }
        $path = str_replace(WWW_ROOT, '/', $path);

        return str_replace(DS, '/', $path);
    }
protected function _relativizePath ( $ path ) { $ plugins = Plugin :: loaded ( ) ; $ index = array_search ( 'AssetCompress' , $ plugins ) ; unset ( $ plugins [ $ index ] ) ; foreach ( $ plugins as $ plugin ) { $ pluginPath = Plugin :: path ( $ plugin ) . 'webroot' ; if ( strpos ( $ path , $ pluginPath ) === 0 ) { return str_replace ( $ pluginPath , '/' . Inflector :: underscore ( $ plugin ) , $ path ) ; } } $ path = str_replace ( WWW_ROOT , '/' , $ path ) ; return str_replace ( DS , '/' , $ path ) ; }
Converts an absolute path into a web relative one.

@param string $path The path to convert
@return string A webroot relative string.
Converts an absolute path into a web relative one .