protected function getAbsolutePath($file, $currentPath = null)
{
if (self::isAbsolutePath($file)) {
return $file;
} else if (null !== $currentPath && file_exists($currentPath.DIRECTORY_SEPARATOR.$file)) {
return $currentPath.DIRECTORY_SEPARATOR.$file;
} else {
foreach ($this->paths as $path) {
if (file_exists($path.DIRECTORY_SEPARATOR.$file)) {
return $path.DIRECTORY_SEPARATOR.$file;
}
}
}
return $file;
}