1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
factory.php
См. документацию.
1<?
2
3namespace Bitrix\Seo\Retargeting;
4
5use Bitrix\Main\ArgumentOutOfRangeException;
6
7class 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}
$type
Определения options.php:106
static create($object, $type, $parameters=null)
Определения factory.php:9
$instance
Определения ps_b24_final.php:14