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