Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
autoload.php
01 <?php
02
03 /* An autoloader for ReCaptcha\Foo classes. This should be require()d
04 * by the user before attempting to instantiate any of the ReCaptcha
05 * classes.
06 */
07
08 spl_autoload_register(function ($class) {
09 if (substr($class, 0, 10) !== 'ReCaptcha\\') {
10 /* If the class does not lie under the "ReCaptcha" namespace,
11 * then we can exit immediately.
12 */
13 return;
14 }
15
16 /* All of the classes have names like "ReCaptcha\Foo", so we need
17 * to replace the backslashes with frontslashes if we want the
18 * name to map directly to a location in the filesystem.
19 */
20 $class = str_replace('\\', '/', $class);
21
22 /* First, check under the current directory. It is important that
23 * we look here first, so that we don't waste time searching for
24 * test classes in the common case.
25 */
26 $path = dirname(__FILE__).'/'.$class.'.php';
27 if (is_readable($path)) {
28 require_once $path;
29 }
30
31 /* If we didn't find what we're looking for already, maybe it's
32 * a test class?
33 */
34 $path = dirname(__FILE__).'/../tests/'.$class.'.php';
35 if (is_readable($path)) {
36 require_once $path;
37 }
38 });
39