Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
Locator.php
1
<?php
2
3
namespace
Bitrix\Im\V2\Service
;
4
5
use
Bitrix\Main\DI\ServiceLocator
;
6
7
class
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
{
23
self::setContext
(
new
Context
());
24
}
25
26
return
self::$context;
27
}
28
29
public
static
function
setContext
(?
Context
$context): void
30
{
31
self::$context = $context;
32
}
33
}
Bitrix\Im\V2\Service\Context
Definition
Context.php:8
Bitrix\Im\V2\Service\Locator
Definition
Locator.php:8
Bitrix\Im\V2\Service\Locator\getMessenger
static getMessenger()
Definition
Locator.php:14
Bitrix\Im\V2\Service\Locator\setContext
static setContext(?Context $context)
Definition
Locator.php:29
Bitrix\Im\V2\Service\Locator\getContext
static getContext()
Definition
Locator.php:19
Bitrix\Im\V2\Service\Messenger
Definition
Messenger.php:24
Bitrix\Main\DI\ServiceLocator
Definition
servicelocator.php:12
Bitrix\Im\V2\Service
Definition
Context.php:3
modules
im
lib
V2
Service
Locator.php
Создано системой
1.10.0