public function resolve($name)
{
if ($this->isLfiProtectionOn() && preg_match('#\\.\\.[\\\\/]#', $name)) {
return null;
}
foreach ($this->getPaths() as $path) {
$file = new SplFileInfo($path . $name);
if ($file->isReadable() && !$file->isDir()) {
$filePath = $file->getRealPath();
$mimeType = $this->getMimeResolver()->getMimeType($filePath);
$asset = new FileAsset($filePath);
$asset->mimetype = $mimeType;
return $asset;
}
}
return null;
}