diff options
Diffstat (limited to 'third_party/protobuf/3.4.0/php/tests/autoload.php')
-rwxr-xr-x | third_party/protobuf/3.4.0/php/tests/autoload.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/protobuf/3.4.0/php/tests/autoload.php b/third_party/protobuf/3.4.0/php/tests/autoload.php new file mode 100755 index 0000000000..0a917fc51a --- /dev/null +++ b/third_party/protobuf/3.4.0/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; + } + +} + |