| @@ 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 | ||
| @@ 63-67 (lines=5) @@ | ||
| 60 | { |
|
| 61 | trigger_error('Include "src/autoload.php" instead', E_USER_NOTICE); |
|
| 62 | spl_autoload_register( |
|
| 63 | function ($class_name) { |
|
| 64 | $file = dirname(__FILE__) . DIRECTORY_SEPARATOR; |
|
| 65 | $file .= str_replace([ 'Yabacon\\', '\\' ], ['', DIRECTORY_SEPARATOR ], $class_name) . '.php'; |
|
| 66 | include_once $file; |
|
| 67 | } |
|
| 68 | ); |
|
| 69 | } |
|
| 70 | ||