diff options
Diffstat (limited to 'third_party/protobuf/3.6.0/php/tests/autoload.php')
-rw-r--r-- | third_party/protobuf/3.6.0/php/tests/autoload.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/third_party/protobuf/3.6.0/php/tests/autoload.php b/third_party/protobuf/3.6.0/php/tests/autoload.php new file mode 100644 index 0000000000..b98b13abdf --- /dev/null +++ b/third_party/protobuf/3.6.0/php/tests/autoload.php @@ -0,0 +1,27 @@ +<?php + +error_reporting(E_ALL); + +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; + } + +} + |