public function setFiles(array $files)
{
foreach ($files as $file) {
if (is_file($file)) {
$file = new SplFileInfo($file);
}
if (!$file instanceof SplFileInfo) {
throw new InvalidArgumentException("File {$file} not exists.");
}
$file = new SplFileInfo($path);
$this->files[$file->getRealPath()] = $file;
}
return $this;
}