Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Locator.php
1<?php
2
4
6
7class Locator
8{
9 private static ?Context $context = null;
10
11 private function __construct()
12 {}
13
14 public static function getMessenger(): Messenger
15 {
16 return ServiceLocator::getInstance()->get('Im.Messenger');
17 }
18
19 public static function getContext(): Context
20 {
21 if (!self::$context instanceof Context)
22 {
24 }
25
26 return self::$context;
27 }
28
29 public static function setContext(?Context $context): void
30 {
31 self::$context = $context;
32 }
33}
static setContext(?Context $context)
Definition Locator.php:29