| Index: third_party/protobuf/php/tests/autoload.php
|
| diff --git a/third_party/protobuf/php/tests/autoload.php b/third_party/protobuf/php/tests/autoload.php
|
| old mode 100644
|
| new mode 100755
|
| index af88ba01496ee24165c89cf06eaaff3a0f8097e5..0a917fc51a4a58a1091e91c042c5fed88c8d913a
|
| --- a/third_party/protobuf/php/tests/autoload.php
|
| +++ b/third_party/protobuf/php/tests/autoload.php
|
| @@ -1,4 +1,25 @@
|
| <?php
|
|
|
| -require_once('test.pb.php');
|
| -require_once('test_util.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;
|
| + }
|
| +
|
| +}
|
| +
|
|
|