@@ 8-14 (lines=7) @@ | ||
5 | * For use when library is being used without composer |
|
6 | */ |
|
7 | spl_autoload_register( |
|
8 | function ($class_name) { |
|
9 | if (strpos($class_name, 'Yabacon\Paystack')===0) { |
|
10 | $file = dirname(__FILE__) . DIRECTORY_SEPARATOR; |
|
11 | $file .= str_replace([ 'Yabacon\\', '\\' ], ['', DIRECTORY_SEPARATOR ], $class_name) . '.php'; |
|
12 | include_once $file; |
|
13 | } |
|
14 | } |
|
15 | ); |
|
16 |
@@ 75-79 (lines=5) @@ | ||
72 | { |
|
73 | trigger_error('Include "src/autoload.php" instead', E_USER_NOTICE); |
|
74 | spl_autoload_register( |
|
75 | function ($class_name) { |
|
76 | $file = dirname(__FILE__) . DIRECTORY_SEPARATOR; |
|
77 | $file .= str_replace([ 'Yabacon\\', '\\' ], ['', DIRECTORY_SEPARATOR ], $class_name) . '.php'; |
|
78 | include_once $file; |
|
79 | } |
|
80 | ); |
|
81 | } |
|
82 |