Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
factory.php
1
<?
2
3
namespace
Bitrix\Seo\Retargeting
;
4
5
use
Bitrix\Main\ArgumentOutOfRangeException
;
6
7
class
Factory
8
{
9
public
static
function
create
($object, $type, $parameters =
null
)
10
{
11
$spaceList = explode(
'\\'
, $object);
12
$objectClassName = array_pop($spaceList);
13
array_push($spaceList,
'Services'
, $objectClassName);
14
$className = implode(
'\\'
, $spaceList).mb_strtoupper(mb_substr($type, 0, 1)).mb_strtolower(mb_substr($type, 1));
15
16
if
(!class_exists($object))
17
{
18
throw
new
ArgumentOutOfRangeException
(
'Object'
);
19
}
20
21
if
(!class_exists($className))
22
{
23
throw
new
ArgumentOutOfRangeException
(
'Type'
);
24
}
25
26
$instance =
new
$className($parameters);
27
28
return
$instance;
29
}
30
}
Bitrix\Main\ArgumentOutOfRangeException
Definition
exception.php:67
Bitrix\Seo\Retargeting\Factory
Definition
factory.php:8
Bitrix\Seo\Retargeting\Factory\create
static create($object, $type, $parameters=null)
Definition
factory.php:9
Bitrix\Seo\Retargeting
Definition
account.php:3
modules
seo
lib
retargeting
factory.php
Создано системой
1.10.0