Documentation

Bitrix Namespace

\Bitrix - is a namespace that stores D7 methods. The system allows for developers to create custom classes and methods; however, they must be stored in corresponding custom namespaces.

The namespace allows assigning more specific clear names to system elements, without multiple prefixes and without potential conflicts. All classes, supplied in the standard installation package must be located in the \Bitrix namespace that is not related neither with PHP, nor partner's developers. Each standard module defines its own subspace that match with the module name within the \Bitrix namespace. For example, namespace \Bitrix\Forum is intended for a forum module, and for the main module - \Bitrix\Main.

When required, module can organize subspaces inside its namespace. For example, \Bitrix\Main\IO, \Bitrix\Forum\SomeName\SomeNameTwo. But this feature should be used only when it is warranted for organizing correct module architecture.



© «Bitrix24», 2001-2024