/
gesar93
/
gesar.kafka
Обзор
Документация
Войти
/
gesar93
/
gesar.kafka
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
include.php
30 строк
821 B
Ilya Donskikh
Initial
02 фев 2026, 09:45
02 фев 2026, 09:45
9bb8c02
Код
Авторство
О чём код?
<?php use Bitrix\Main\Loader; // Optional: module-local composer autoload (external deps, PSR-4). $composerAutoload = __DIR__ . '/vendor/autoload.php'; if (is_file($composerAutoload)) { require_once $composerAutoload; } // Fallback autoload for environments without module composer vendor. // Bitrix core autoloader is not a full PSR-4 loader, so we register our own. spl_autoload_register(static function (string $className): void { $prefix = 'Bitrix\\Gesar\\Kafka\\'; if (strncmp($className, $prefix, strlen($prefix)) !== 0) { return; } $relative = substr($className, strlen($prefix)); $path = __DIR__ . '/lib/' . str_replace('\\', '/', $relative) . '.php'; if (is_file($path)) { require_once $path; } }); // Keep Bitrix dependencies explicit (helps with CLI scripts). Loader::requireModule('main');