| 1 |
<?php |
| 2 |
/* |
| 3 |
* SOFTWARE LICENSE INFORMATION |
| 4 |
* |
| 5 |
* Copyright (c) 2017 Buttonizer, all rights reserved. |
| 6 |
* |
| 7 |
* This file is part of Buttonizer |
| 8 |
* |
| 9 |
* For detailed information regarding to the licensing of |
| 10 |
* this software, please review the license.txt or visit: |
| 11 |
* https://buttonizer.pro/license/ |
| 12 |
*/ |
| 13 |
|
| 14 |
// Load Strauss classmap autoloader for Buttonizer\Core\* classes |
| 15 |
require_once __DIR__ . '/Core/autoload.php'; |
| 16 |
|
| 17 |
spl_autoload_register(function ($class_name) { |
| 18 |
try { |
| 19 |
if (substr($class_name, 0, 10) === 'Buttonizer') { |
| 20 |
// Skip Core\ classes — handled by Strauss classmap autoloader above |
| 21 |
if (substr($class_name, 0, 16) === 'Buttonizer\Core\\') { |
| 22 |
return; |
| 23 |
} |
| 24 |
|
| 25 |
$class_name = substr($class_name, 10); |
| 26 |
|
| 27 |
require BUTTONIZER_APP_DIR . str_replace("\\", "/", $class_name) . '.php'; |
| 28 |
} |
| 29 |
} catch (\Exception $e) { |
| 30 |
exit("Error: " . $e->getMessage()); |
| 31 |
} |
| 32 |
}); |
| 33 |
|