1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
agent.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Internals\EventService\Queue
;
4
5
class
Agent
6
{
7
private
static
bool
$processing =
false
;
8
9
public
static
function
execute
()
10
{
11
if
(self::$processing)
12
{
13
return
self::getAgentName();
14
}
15
16
self::$processing =
true
;
17
18
$rowsProcessed =
Queue::getInstance
()->process();
19
20
self::$processing =
false
;
21
22
return
($rowsProcessed > 0) ? self::getAgentName() :
''
;
23
}
24
25
public
function
__construct
()
26
{
27
28
}
29
30
public
function
addAgent
(): void
31
{
32
$res
= \CAgent::GetList(
33
[
'ID'
=>
'DESC'
],
34
[
35
'=NAME'
=> self::getAgentName()
36
]
37
);
38
if
(
$res
->Fetch())
39
{
40
return
;
41
}
42
43
\CAgent::AddAgent(
44
self::getAgentName(),
45
'socialnetwork'
,
46
'N'
,
47
0,
48
''
,
49
'Y'
,
50
''
51
);
52
}
53
54
public
function
removeAgent
(): void
55
{
56
\CAgent::RemoveAgent(self::getAgentName(),
'socialnetwork'
);
57
}
58
59
private
static
function
getAgentName(): string
60
{
61
return
static::class .
"::execute();"
;
62
}
63
}
Bitrix\Socialnetwork\Internals\EventService\Queue\Agent
Определения
agent.php:6
Bitrix\Socialnetwork\Internals\EventService\Queue\Agent\__construct
__construct()
Определения
agent.php:25
Bitrix\Socialnetwork\Internals\EventService\Queue\Agent\removeAgent
removeAgent()
Определения
agent.php:54
Bitrix\Socialnetwork\Internals\EventService\Queue\Agent\addAgent
addAgent()
Определения
agent.php:30
Bitrix\Socialnetwork\Internals\EventService\Queue\Agent\execute
static execute()
Определения
agent.php:9
Bitrix\Socialnetwork\Internals\EventService\Queue\Queue\getInstance
static getInstance()
Определения
queue.php:23
$res
$res
Определения
filter_act.php:7
Bitrix\Socialnetwork\Internals\EventService\Queue
Определения
agent.php:3
bitrix
modules
socialnetwork
lib
internals
eventservice
queue
agent.php
Создано системой
1.14.0