Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
spl_autoload_register(function ($className) {
|
||||
if (strpos($className, 'Braintree') !== 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fileName = dirname(__DIR__) . '/lib/';
|
||||
|
||||
if ($lastNsPos = strripos($className, '\\')) {
|
||||
$namespace = substr($className, 0, $lastNsPos);
|
||||
$className = substr($className, $lastNsPos + 1);
|
||||
$fileName .= str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
$fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
|
||||
|
||||
if (is_file($fileName)) {
|
||||
require_once $fileName;
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user