I've added folder sharing to my vm and mac os is automatically creating .AppleDouble directories in each folder. FactoryMuffin is picking up on them, which results in invalid files being loaded. I've updated the regex statement, which filters the files:
private function loadDirectory($path)
{
$directory = new RecursiveDirectoryIterator($path);
$iterator = new RecursiveIteratorIterator($directory);
$files = new RegexIterator($iterator, '/^[^\.](?:(?!\/\.).)+?\.php$/i');
$fm = $this;
foreach ($files as $file) {
require $file->getPathName();
}
}
Not sure if that's the correct way of going about it.
I've added folder sharing to my vm and mac os is automatically creating .AppleDouble directories in each folder. FactoryMuffin is picking up on them, which results in invalid files being loaded. I've updated the regex statement, which filters the files:
Not sure if that's the correct way of going about it.