Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
context.php
1<?php
2
4
7
8class Context implements ContextInterface
9{
11 private Helper $helper;
13 private Connection $connection;
15 private ?VendorSyncManager $syncManager = null;
17 private ?VendorSyncService $syncService = null;
19 private ?ApiService $apiService = null;
21 private ?ApiClient $apiClient = null;
22
23 public function __construct(Connection $connection)
24 {
25 $this->connection = $connection;
26 $this->helper = new Helper();
27 }
28
30 {
31 if (!$this->syncManager)
32 {
33 $this->syncManager = new VendorSyncManager();
34 }
35
36 return $this->syncManager;
37 }
38
40 {
41 if (!$this->syncService)
42 {
43 $this->syncService = new VendorSyncService();
44 }
45
46 return $this->syncService;
47 }
48
49 public function getApiService(): ApiService
50 {
51 if (!$this->apiService)
52 {
53 $this->apiService = new ApiService();
54 }
55
56 return $this->apiService;
57 }
58
59 public function getHelper(): Helper
60 {
61 return $this->helper;
62 }
63
64 public function getConnection(): Connection
65 {
66 return $this->connection;
67 }
68}
__construct(Connection $connection)
Definition context.php:23