Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
loggerdiagbase.php
1
<?php
2
3
4
namespace
Bitrix\Sale\Exchange\Internals
;
5
6
7
use
Bitrix\Main\Config\Option
;
8
use
Bitrix\Main\NotImplementedException
;
9
10
class
LoggerDiagBase
extends
Logger
11
{
12
static
protected
function
getNameOptionEndTime
()
13
{
14
throw
new
NotImplementedException
(
'The method getNameOptionEndTime is not implemented.'
);
15
}
16
17
static
protected
function
getNameOptionIntervalDayOption
()
18
{
19
throw
new
NotImplementedException
(
'The method getNameOptionIntervalDayOption is not implemented.'
);
20
}
21
22
public
static
function
isOn
()
23
{
24
return
time() < Option::get(
"sale"
, static::getNameOptionEndTime(), 0);
25
}
26
27
public
static
function
enable
($endTime = 0)
28
{
29
Option::set(
"sale"
, static::getNameOptionEndTime(), intval($endTime));
30
}
31
32
public
static
function
disable
()
33
{
34
Option::delete(
"sale"
, array(
"name"
=> static::getNameOptionEndTime()));
35
}
36
37
public
static
function
getEndTime
()
38
{
39
return
intval(Option::get(
"sale"
, static::getNameOptionEndTime(), 0));
40
}
41
45
static
public
function
getInterval
()
46
{
47
$interval = Option::get(
'sale'
, static::getNameOptionIntervalDayOption(), 1);
48
return
intval($interval)>0 ? $interval:1;
49
}
50
}
Bitrix\Main\Config\Option
Definition
option.php:15
Bitrix\Main\NotImplementedException
Definition
exception.php:147
Bitrix\Sale\Exchange\Internals\LoggerDiagBase
Definition
loggerdiagbase.php:11
Bitrix\Sale\Exchange\Internals\LoggerDiagBase\enable
static enable($endTime=0)
Definition
loggerdiagbase.php:27
Bitrix\Sale\Exchange\Internals\LoggerDiagBase\isOn
static isOn()
Definition
loggerdiagbase.php:22
Bitrix\Sale\Exchange\Internals\LoggerDiagBase\disable
static disable()
Definition
loggerdiagbase.php:32
Bitrix\Sale\Exchange\Internals\LoggerDiagBase\getNameOptionIntervalDayOption
static getNameOptionIntervalDayOption()
Definition
loggerdiagbase.php:17
Bitrix\Sale\Exchange\Internals\LoggerDiagBase\getInterval
static getInterval()
Definition
loggerdiagbase.php:45
Bitrix\Sale\Exchange\Internals\LoggerDiagBase\getEndTime
static getEndTime()
Definition
loggerdiagbase.php:37
Bitrix\Sale\Exchange\Internals\LoggerDiagBase\getNameOptionEndTime
static getNameOptionEndTime()
Definition
loggerdiagbase.php:12
Bitrix\Sale\Exchange\Internals\Logger
Definition
logger.php:13
Bitrix\Sale\Exchange\Internals
Definition
exchangelog.php:3
modules
sale
lib
exchange
internals
loggerdiagbase.php
Создано системой
1.10.0