Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
factory.php
1<?php
2
4
5class Factory
6{
11 static public function create($type)
12 {
13 if ($type == Enum::TYPE_CRM)
14 {
15 return new Crm();
16 }
17 elseif ($type == Enum::TYPE_MATERIAL)
18 {
19 return new Material();
20 }
21 elseif ($type == Enum::TYPE_MENU)
22 {
23 return new Menu();
24 }
25 elseif ($type == Enum::TYPE_STORE)
26 {
27 return new Store();
28 }
29 return null;
30 }
31}