Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
factory.php
1
<?php
2
3
namespace
Bitrix\Seo\Checkout
;
4
5
use
Bitrix\Main\ArgumentOutOfRangeException
;
6
11
class
Factory
12
{
20
public
static
function
create
($object, $type, $parameters =
null
)
21
{
22
$spaceList = explode(
'\\'
, $object);
23
$objectClassName = array_pop($spaceList);
24
array_push($spaceList,
'Services'
, $objectClassName);
25
$className = implode(
'\\'
, $spaceList).mb_strtoupper(mb_substr($type, 0, 1)).mb_strtolower(mb_substr($type, 1));
26
27
if
(!class_exists($object))
28
{
29
throw
new
ArgumentOutOfRangeException
(
'Object'
);
30
}
31
32
if
(!class_exists($className))
33
{
34
throw
new
ArgumentOutOfRangeException
(
'Type'
);
35
}
36
37
$instance =
new
$className($parameters);
38
39
return
$instance;
40
}
41
}
Bitrix\Main\ArgumentOutOfRangeException
Definition
exception.php:67
Bitrix\Seo\Checkout\Factory
Definition
factory.php:12
Bitrix\Seo\Checkout\Factory\create
static create($object, $type, $parameters=null)
Definition
factory.php:20
Bitrix\Seo\Checkout
Definition
authadapter.php:3
modules
seo
lib
checkout
factory.php
Создано системой
1.10.0