1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
env.php
См. документацию.
1
<?php
8
9
namespace
Bitrix\Sender\Runtime
;
10
11
use
Bitrix\Main\Config\Option
;
12
use
Bitrix\Sender\Integration\Bitrix24\Service
;
13
use
Bitrix\Sender\Posting\ThreadStrategy\IThreadStrategy
;
14
use
Bitrix\Sender\Posting\ThreadStrategy\ThreadStrategyContext
;
15
use
Bitrix\Sender\Posting\SegmentThreadStrategy
;
16
21
class
Env
22
{
28
public
static
function
isSenderJobCron
()
29
{
30
return
Option::get(
"sender"
,
"auto_method"
) ===
'cron'
;
31
}
32
38
public
static
function
isReiteratedJobCron
()
39
{
40
return
Option::get(
"sender"
,
"reiterate_method"
) ===
'cron'
;
41
}
42
48
public
static
function
getJobExecutionTimeout
()
49
{
50
return
self::isSenderJobCron
() ? 0 : (int) Option::get(
'sender'
,
'interval'
);
51
}
52
58
public
static
function
getJobExecutionItemLimit
()
59
{
60
if
(self::isSenderJobCron())
61
{
62
return
(
int
) Option::get(
'sender'
,
'max_emails_per_cron'
);
63
}
64
else
65
{
66
return
(
int
) Option::get(
'sender'
,
'max_emails_per_hit'
);
67
}
68
}
69
70
public
static
function
isTransportNeedConsent
(
string
$code
) : bool
71
{
72
return
Option::get(
'sender'
,
"{$code}_consent"
) ===
'Y'
;
73
}
74
75
public
static
function
getMaxConsentRequests
(
string
$code
) : bool
76
{
77
return
(
int
) Option::get(
'sender'
,
'~'
.
$code
.
'_max_consent_requests'
,0);
78
}
79
85
public
static
function
getThreadContext
()
86
{
87
return
ThreadStrategyContext::buildStrategy(Option::get(
'sender'
,
'thread_type'
));
88
}
89
95
public
static
function
getGroupThreadContext
()
96
{
97
return
SegmentThreadStrategy\ThreadStrategyContext::buildStrategy
(Option::get(
'sender'
,
'thread_type'
));
98
}
99
}
Bitrix\Main\Config\Option
Определения
option.php:15
Bitrix\Sender\Posting\SegmentThreadStrategy\ThreadStrategyContext\buildStrategy
static buildStrategy($type)
Определения
threadstrategycontext.php:9
Bitrix\Sender\Posting\ThreadStrategy\ThreadStrategyContext
Определения
threadstrategycontext.php:6
Bitrix\Sender\Runtime\Env
Определения
env.php:22
Bitrix\Sender\Runtime\Env\getGroupThreadContext
static getGroupThreadContext()
Определения
env.php:95
Bitrix\Sender\Runtime\Env\getThreadContext
static getThreadContext()
Определения
env.php:85
Bitrix\Sender\Runtime\Env\getMaxConsentRequests
static getMaxConsentRequests(string $code)
Определения
env.php:75
Bitrix\Sender\Runtime\Env\isSenderJobCron
static isSenderJobCron()
Определения
env.php:28
Bitrix\Sender\Runtime\Env\isTransportNeedConsent
static isTransportNeedConsent(string $code)
Определения
env.php:70
Bitrix\Sender\Runtime\Env\getJobExecutionTimeout
static getJobExecutionTimeout()
Определения
env.php:48
Bitrix\Sender\Runtime\Env\isReiteratedJobCron
static isReiteratedJobCron()
Определения
env.php:38
Bitrix\Sender\Runtime\Env\getJobExecutionItemLimit
static getJobExecutionItemLimit()
Определения
env.php:58
Bitrix\Sender\Posting\ThreadStrategy\IThreadStrategy
Определения
ithreadstrategy.php:8
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Main\Service
Bitrix\Sender\Posting\SegmentThreadStrategy
Определения
abstractthreadstrategy.php:3
Bitrix\Sender\Runtime
Определения
env.php:9
bitrix
modules
sender
lib
runtime
env.php
Создано системой
1.14.0