Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
transportim.php
1
<?php
9
namespace
Bitrix\Sender\Integration\Im
;
10
11
use
Bitrix\Sender\Transport
;
12
use
Bitrix\Sender\Message
;
13
use
Bitrix\Sender\Recipient
;
14
19
class
TransportIm
implements
Transport\iBase
,
Transport\iLimitation
20
{
21
const
CODE
=
self::CODE_IM
;
22
24
protected
$configuration
;
25
26
public
function
__construct
()
27
{
28
$this->configuration =
new
Message\Configuration
();
29
}
30
36
public
function
getName
()
37
{
38
return
'Im'
;
39
}
40
46
public
function
getCode
()
47
{
48
return
self::CODE
;
49
}
50
56
public
function
getSupportedRecipientTypes
()
57
{
58
return
array(Recipient\Type::IM);
59
}
60
66
public
function
loadConfiguration
()
67
{
68
return
$this->configuration
;
69
}
70
71
public
function
saveConfiguration
(
Message
\
Configuration
$configuration
)
72
{
73
$this->configuration =
$configuration
;
74
}
75
76
public
function
start
()
77
{
78
79
}
80
81
public
function
send
(
Message
\
Adapter
$message)
82
{
83
$to = $message->getTo();
84
$text = $message->getConfiguration()->get(
'MESSAGE_TEXT'
);
85
$text = $message->replaceFields($text);
86
87
return
Service::send
($to, $text);
88
}
89
90
public
function
getLimiters
(
Message
\
iBase
$message =
null
)
91
{
92
return
array(
93
Transport\TimeLimiter::create()
94
->withLetter($message)
95
);
96
}
97
98
public
function
end
()
99
{
100
101
}
102
}
Bitrix\Main\Config\Configuration
Definition
configuration.php:7
Bitrix\Sender\Entity\Message
Definition
message.php:27
Bitrix\Sender\Integration\Im\Service\send
static send($to, $text)
Definition
service.php:66
Bitrix\Sender\Integration\Im\TransportIm
Definition
transportim.php:20
Bitrix\Sender\Integration\Im\TransportIm\CODE
const CODE
Definition
transportim.php:21
Bitrix\Sender\Integration\Im\TransportIm\__construct
__construct()
Definition
transportim.php:26
Bitrix\Sender\Integration\Im\TransportIm\getName
getName()
Definition
transportim.php:36
Bitrix\Sender\Integration\Im\TransportIm\getSupportedRecipientTypes
getSupportedRecipientTypes()
Definition
transportim.php:56
Bitrix\Sender\Integration\Im\TransportIm\send
send(Message\Adapter $message)
Definition
transportim.php:81
Bitrix\Sender\Integration\Im\TransportIm\end
end()
Definition
transportim.php:98
Bitrix\Sender\Integration\Im\TransportIm\loadConfiguration
loadConfiguration()
Definition
transportim.php:66
Bitrix\Sender\Integration\Im\TransportIm\$configuration
$configuration
Definition
transportim.php:24
Bitrix\Sender\Integration\Im\TransportIm\getLimiters
getLimiters(Message\iBase $message=null)
Definition
transportim.php:90
Bitrix\Sender\Integration\Im\TransportIm\getCode
getCode()
Definition
transportim.php:46
Bitrix\Sender\Integration\Im\TransportIm\saveConfiguration
saveConfiguration(Message\Configuration $configuration)
Definition
transportim.php:71
Bitrix\Sender\Integration\Im\TransportIm\start
start()
Definition
transportim.php:76
Bitrix\Sender\Message\Adapter
Definition
adapter.php:21
Bitrix\Sender\Message\iBase
Definition
ibase.php:16
Bitrix\Sender\Message\iBase\CODE_IM
const CODE_IM
Definition
ibase.php:21
Bitrix\Sender\Transport\iLimitation
Definition
ilimitation.php:18
Bitrix\Sender\Integration\Im
Definition
messageim.php:9
Bitrix\Sender\Message
Definition
adapter.php:9
Bitrix\Sender\Recipient
Definition
agent.php:8
Bitrix\Sender\Transport
Definition
adapter.php:9
modules
sender
lib
integration
im
transportim.php
Создано системой
1.10.0