Definition at line 13 of file Autoloader.php.
◆ Load()
static Complex\Autoloader::Load |
( |
|
$pClassName | ) |
|
|
static |
Autoload a class identified by name.
- Parameters
-
string | $pClassName | Name of the object to load |
Definition at line 35 of file Autoloader.php.
36 {
37 if ((class_exists($pClassName, false)) || (strpos($pClassName, 'Complex\\') !== 0)) {
38
39 return false;
40 }
41
42 $pClassFilePath = __DIR__ . DIRECTORY_SEPARATOR .
43 'src' . DIRECTORY_SEPARATOR .
44 str_replace(['Complex\\', '\\'], ['', '/'], $pClassName) .
45 '.php';
46
47 if ((file_exists($pClassFilePath) === false) || (is_readable($pClassFilePath) === false)) {
48
49 return false;
50 }
51 require($pClassFilePath);
52 }
◆ Register()
static Complex\Autoloader::Register |
( |
| ) |
|
|
static |
Register the Autoloader with SPL.
Definition at line 19 of file Autoloader.php.
20 {
21 if (function_exists('__autoload')) {
22
23 spl_autoload_register('__autoload');
24 }
25
26 return spl_autoload_register(['Complex\\Autoloader', 'Load']);
27 }
The documentation for this class was generated from the following file: