Created
November 3, 2020 14:54
-
-
Save SuperKa3a/2421d21511f68469df0ef9043faa3a7f to your computer and use it in GitHub Desktop.
Bitrix(d7). Autoload classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use \Bitrix\Main\Loader; | |
| Loader::registerAutoLoadClasses($module = null, [ | |
| 'Site\\Controller' => '/local/php_interface/lib/Site/Controller.php', | |
| ]); | |
| //usage | |
| use Site\Controller; | |
| $controller = new Controller(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| \CModule::AddAutoloadClasses( | |
| '', | |
| array( | |
| 'Site\\Controller' => '/local/php_interface/lib/Site/Controller.php', | |
| ) | |
| ); | |
| //usage | |
| use Site\Controller; | |
| $controller = new Controller(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment