Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
env.php
1<?php
10
16
21class 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}
static getGroupThreadContext()
Definition env.php:95
static getThreadContext()
Definition env.php:85
static getMaxConsentRequests(string $code)
Definition env.php:75
static isSenderJobCron()
Definition env.php:28
static isTransportNeedConsent(string $code)
Definition env.php:70
static getJobExecutionTimeout()
Definition env.php:48
static isReiteratedJobCron()
Definition env.php:38
static getJobExecutionItemLimit()
Definition env.php:58