protected function getFilesRecursive($path)
{
$files = [];
$scan = array_diff(scandir($path), ['.', '..']);
foreach ($scan as $file) {
$file = realpath("{$path}{$file}");
if (is_dir($file)) {
$files = array_merge($files, $this->getFilesRecursive($file . DIRECTORY_SEPARATOR));
continue;
}
$files[] = $file;
}
return $files;
}