Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
abstractconsentmessagebuilder.php
1
<?php
2
3
namespace
Bitrix\Sender\Consent
;
4
5
abstract
class
AbstractConsentMessageBuilder
implements
iConsentMessageBuilder
6
{
7
protected
$fields
= [];
8
15
protected
static
abstract
function
filterFields
(array $fieldForConsent) : array;
16
23
protected
static
abstract
function
checkRequireFields
(?array
$fields
) : bool;
24
25
public
function
__construct
(?array
$fields
=
null
)
26
{
27
if
(is_array(
$fields
))
28
{
29
$this->
setFields
($fields);
30
}
31
}
32
39
public
function
setFields
(?array $fieldForConsent):
AbstractConsentMessageBuilder
40
{
41
$fields
= $this->
filterFields
($fieldForConsent);
42
if
($this->
checkRequireFields
($fields))
43
{
44
$this->fields =
$fields
;
45
return
$this;
46
}
47
throw
new \InvalidArgumentException(
""
);
48
}
49
57
public
function
set
(
string
$field, $value)
58
{
59
return
$this->fields[$field] = $value;
60
}
61
68
public
function
get
(
string
$field)
69
{
70
return
$this->fields[$field];
71
}
72
76
public
abstract
function
buildMessage
();
77
}
Bitrix\Sender\Consent\AbstractConsentMessageBuilder
Definition
abstractconsentmessagebuilder.php:6
Bitrix\Sender\Consent\AbstractConsentMessageBuilder\buildMessage
buildMessage()
Bitrix\Sender\Consent\AbstractConsentMessageBuilder\checkRequireFields
static checkRequireFields(?array $fields)
Bitrix\Sender\Consent\AbstractConsentMessageBuilder\$fields
$fields
Definition
abstractconsentmessagebuilder.php:7
Bitrix\Sender\Consent\AbstractConsentMessageBuilder\filterFields
static filterFields(array $fieldForConsent)
Bitrix\Sender\Consent\AbstractConsentMessageBuilder\setFields
setFields(?array $fieldForConsent)
Definition
abstractconsentmessagebuilder.php:39
Bitrix\Sender\Consent\AbstractConsentMessageBuilder\__construct
__construct(?array $fields=null)
Definition
abstractconsentmessagebuilder.php:25
Bitrix\Sender\Consent\iConsentMessageBuilder
Definition
iconsentmessagebuilder.php:6
Bitrix\Sender\Consent
Definition
abstractconsentmessagebuilder.php:3
modules
sender
lib
consent
abstractconsentmessagebuilder.php
Создано системой
1.10.0