protected function _relativeFromRoot($folder, $path)
{
$root = !empty($this->params['root']) ? $this->params['root'] : $this->args[0];
$split = explode(DS . $folder . DS, $path);
if (empty($split[0]) || strpos($split[0], $root) !== 0) {
return $folder;
}
$relativePath = substr($split[0], strlen($root));
if (!$relativePath) {
return $folder;
}
return $relativePath . DS . $folder;
}