Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
factory.php
1<?php
2
3
5
6
7class Factory
8{
9 static public function create($type)
10 {
11 if($type == Registry::CRM_DEAL_ADD_NAME)
12 {
13 return new CmdDealAdd();
14 }
15 elseif($type == Registry::CRM_CONTACT_ADD_NAME)
16 {
17 return new CmdContactAdd();
18 }
19 elseif($type == Registry::CRM_COMPANY_ADD_NAME)
20 {
21 return new CmdCompanyAdd();
22 }
23 elseif($type == Registry::CRM_ACTIVITY_ADD_NAME)
24 {
25 return new CmdActivityAdd();
26 }
27 else
28 {
29 return new Base();
30 }
31 }
32}