Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
managerimport.php
1<?php
2
4
5
10
11final class ManagerImport extends ManagerBase
12{
14 protected $collision = null;
16 protected $criterion = null;
17
21 static public function getDirectionType()
22 {
24 }
25
29 static public function configure(ImportBase $entity)
30 {
31 $config = static::getImportByType($entity->getOwnerTypeId());
32
33 $entity->loadSettings($config->settings);
34 $entity->loadCollision($config->collision);
35 $entity->loadCriterion($config->criterion);
36 $entity->loadLogger($config->logger);
37 }
38
49 static public function registerInstance($typeId, ISettingsImport $settings, ICollision $collision = null, ICriterion $criterion = null)
50 {
51 static::IsDefinedTypeId($typeId);
52
53 if(self::$instance[$typeId] === null)
54 {
55 $manager = new static();
56 $manager->settings = $settings;
57 $manager->collision = $collision !== null ? $collision : new ImportCollision();
58 $manager->criterion = $criterion !== null ? $criterion : new ImportCriterionBase();
59 $manager->logger = new LoggerDiag();
60
61 self::$instance[$typeId] = $manager;
62 }
63 return self::$instance[$typeId];
64 }
65
71 static public function getSettingsByType($typeId)
72 {
73 static::IsDefinedTypeId($typeId);
74
75 $config = static::getImportByType($typeId);
76
77 return $config->settings;
78 }
79}
loadLogger(Exchange\Internals\Logger $logger)
loadCriterion(ICriterion $criterion)
loadSettings(ISettings $settings)
loadCollision(ICollision $collision)
static configure(ImportBase $entity)
static registerInstance($typeId, ISettingsImport $settings, ICollision $collision=null, ICriterion $criterion=null)