ktamas77 /
firebase-php
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | spl_autoload_register(function($class) { |
||
| 4 | $ns = 'Firebase'; |
||
| 5 | $base_dir = __DIR__ . '/src'; |
||
| 6 | $prefix_len = strlen($ns); |
||
| 7 | if (substr($class, 0, $prefix_len) !== $ns) { |
||
| 8 | return; |
||
| 9 | } |
||
| 10 | // strip the prefix off the class |
||
| 11 | $class = substr($class, $prefix_len); |
||
| 12 | // a partial filename |
||
| 13 | $file = $base_dir .str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; |
||
| 14 | var_dump($file); |
||
|
0 ignored issues
–
show
Security
Debugging Code
introduced
by
Loading history...
|
|||
| 15 | if (is_readable($file)) { |
||
| 16 | require $file; |
||
| 17 | } |
||
| 18 | }); |
||
| 19 |