diff options
Diffstat (limited to 'php/tests/autoload.php')
-rwxr-xr-x | php/tests/autoload.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/php/tests/autoload.php b/php/tests/autoload.php new file mode 100755 index 00000000..0a917fc5 --- /dev/null +++ b/php/tests/autoload.php @@ -0,0 +1,25 @@ +<?php + +function getGeneratedFiles($dir, &$results = array()) +{ + $files = scandir($dir); + + foreach ($files as $key => $value) { + $path = realpath($dir.DIRECTORY_SEPARATOR.$value); + if (!is_dir($path)) { + $results[] = $path; + } else if ($value != "." && $value != "..") { + getGeneratedFiles($path, $results); + } + } + return $results; +} + +foreach (getGeneratedFiles("generated") as $filename) +{ + if (!is_dir($filename)) { + include_once $filename; + } + +} + |