Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
IpPerPhone.php
1
<?php
2
3
namespace
Bitrix\MessageService\Restriction
;
4
5
use
Bitrix\Main\Context
;
6
7
class
IpPerPhone
extends
Base
8
{
9
use
Parameterizable
;
10
11
12
public
function
getEntityId
(): string
13
{
14
return
'ipp_'
. $this->
getEntity
();
15
}
16
17
protected
function
getOptionLimitName
(): string
18
{
19
return
'network_restriction_ip_per_phone'
;
20
}
21
22
protected
function
getEntity
(): string
23
{
24
return
$this->message->getTo();
25
}
26
27
protected
function
getCurrentAdditionalParam
(): string
28
{
29
return
Context::getCurrent
()->getServer()->getRemoteAddr();
30
}
31
32
protected
function
getDefaultLimit
(): int
33
{
34
return
0;
35
}
36
}
Bitrix\Main\Context\getCurrent
static getCurrent()
Definition
context.php:241
Bitrix\MessageService\Restriction\Base
Definition
Base.php:12
Bitrix\MessageService\Restriction\IpPerPhone
Definition
IpPerPhone.php:8
Bitrix\MessageService\Restriction\IpPerPhone\getEntityId
getEntityId()
Definition
IpPerPhone.php:12
Bitrix\MessageService\Restriction\IpPerPhone\getEntity
getEntity()
Definition
IpPerPhone.php:22
Bitrix\MessageService\Restriction\IpPerPhone\getDefaultLimit
getDefaultLimit()
Definition
IpPerPhone.php:32
Bitrix\MessageService\Restriction\IpPerPhone\getOptionLimitName
getOptionLimitName()
Definition
IpPerPhone.php:17
Bitrix\MessageService\Restriction\IpPerPhone\getCurrentAdditionalParam
getCurrentAdditionalParam()
Definition
IpPerPhone.php:27
Bitrix\Main\Context
Definition
culture.php:9
Bitrix\MessageService\Restriction
Definition
Base.php:3
Bitrix\MessageService\Restriction\Parameterizable
trait Parameterizable
Definition
Parameterizable.php:8
modules
messageservice
lib
Restriction
IpPerPhone.php
Создано системой
1.10.0