Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
loader.php
1<?php
9namespace Bitrix\Iblock\ORM;
10
12
17class Loader
18{
19 public static function autoLoad($class)
20 {
21 // search for data classes only
22 // object and collection classes will be resolved by main orm loader
23 if (mb_substr($class, -5) !== 'Table')
24 {
25 return;
26 }
27
28 // check iblock regular namespace
29 $namespace = mb_substr($class, 0, mb_strrpos($class, '\\'));
30 $className = mb_substr($class, mb_strrpos($class, '\\') + 1);
31
32 if (
33 $namespace == IblockTable::DATA_CLASS_NAMESPACE // regular iblock entity namespace
34 && mb_strpos($className, IblockTable::DATA_CLASS_PREFIX) === 0 // prefix of iblock entities
35 )
36 {
37 $iblockApiCode = mb_substr($className, mb_strlen(IblockTable::DATA_CLASS_PREFIX), -5);
38 IblockTable::compileEntity($iblockApiCode);
39 }
40 }
41}
static autoLoad($class)
Definition loader.php:19