protected function getRecursiveDirectoryIterator($dir)
    {
        return new \RecursiveIteratorIterator(
                new \RecursiveDirectoryIterator($dir, \FilesystemIterator::CURRENT_AS_FILEINFO),
                \RecursiveIteratorIterator::SELF_FIRST,
                \RecursiveIteratorIterator::CATCH_GET_CHILD
                );
    }
protected function getRecursiveDirectoryIterator($dir)
    {
        return new \RecursiveIteratorIterator(
                new \RecursiveDirectoryIterator($dir, \FilesystemIterator::CURRENT_AS_FILEINFO),
                \RecursiveIteratorIterator::SELF_FIRST,
                \RecursiveIteratorIterator::CATCH_GET_CHILD
                );
    }
protected function getRecursiveDirectoryIterator ( $ dir ) { return new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ dir , \ FilesystemIterator :: CURRENT_AS_FILEINFO ) , \ RecursiveIteratorIterator :: SELF_FIRST , \ RecursiveIteratorIterator :: CATCH_GET_CHILD ) ; }
Iterator for looping thorugh all files in a directory and i's sub directories

@param string $dir
@return \RecursiveIteratorIterator
Iterator for looping thorugh all files in a directory and i s sub directories