| @@ 8-12 (lines=5) @@ | ||
| 5 | * For use when library is being used without composer |
|
| 6 | */ |
|
| 7 | spl_autoload_register( |
|
| 8 | function ($class_name) { |
|
| 9 | $file = dirname(__FILE__) . DIRECTORY_SEPARATOR; |
|
| 10 | $file .= str_replace([ 'Yabacon\\', '\\' ], ['', DIRECTORY_SEPARATOR ], $class_name) . '.php'; |
|
| 11 | include_once $file; |
|
| 12 | } |
|
| 13 | ); |
|
| 14 | ||
| @@ 96-100 (lines=5) @@ | ||
| 93 | { |
|
| 94 | trigger_error('Include "src/autoload.php" instead', E_USER_NOTICE); |
|
| 95 | spl_autoload_register( |
|
| 96 | function ($class_name) { |
|
| 97 | $file = dirname(__FILE__) . DIRECTORY_SEPARATOR; |
|
| 98 | $file .= str_replace([ 'Yabacon\\', '\\' ], ['', DIRECTORY_SEPARATOR ], $class_name) . '.php'; |
|
| 99 | include_once $file; |
|
| 100 | } |
|
| 101 | ); |
|
| 102 | } |
|
| 103 | ||