Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
transportim.php
1<?php
10
14
20{
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
57 {
58 return array(Recipient\Type::IM);
59 }
60
66 public function loadConfiguration()
67 {
69 }
70
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}
getLimiters(Message\iBase $message=null)
saveConfiguration(Message\Configuration $configuration)