Documentation

Loader

Loader class loads the required files, classes and modules. It's a single class that is enabled directly. Used for connecting all modules, except main and fileman.

Similar to the CModule from the old core.

Method Description Available from version
autoLoad Loads methods, registered for autoloading
getDocumentRoot Returns document root.
getLocal Checks for existing file in /local or /bitrix directories.
getPersonal Checks for existing file in personal directory.
includeModule Connects module by its name.
includeSharewareModule Connects partner module by its name.
registerAutoLoadClasses Registers classes for autoloading.
[link=\Bitrix\Main\Loader::registerNamespace]registerNamespace[/link] Registers a namespace.

Example

// D7
use Bitrix\Main\Loader;
Loader::includeModule("iblock");
Loader::includeSharewareModule("eeeeee.tips"); 


© «Bitrix24», 2001-2024
Up