Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
loader.php
1
<?php
9
namespace
Bitrix\Iblock\ORM
;
10
11
use
Bitrix\Iblock\IblockTable
;
12
17
class
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
}
Bitrix\Iblock\IblockTable
Definition
iblocktable.php:79
Bitrix\Iblock\IblockTable\DATA_CLASS_PREFIX
const DATA_CLASS_PREFIX
Definition
iblocktable.php:109
Bitrix\Iblock\IblockTable\DATA_CLASS_NAMESPACE
const DATA_CLASS_NAMESPACE
Definition
iblocktable.php:107
Bitrix\Iblock\ORM\Loader
Definition
loader.php:18
Bitrix\Iblock\ORM\Loader\autoLoad
static autoLoad($class)
Definition
loader.php:19
Bitrix\Iblock\ORM
Definition
commonelement.php:9
modules
iblock
lib
orm
loader.php
Создано системой
1.10.0