src/FactoryMuffin.php
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();
        }
    }
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();
        }
    }
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 ( ) ; } }
Load all the files in a directory.

Each required file will have this instance available as "$fm".

@param string $path The directory path to load.

@return void
Load all the files in a directory .