Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
context.php
1<?php
8namespace Bitrix\Main\Mail;
9
11{
12 const CAT_EXTERNAL = 1;
13 const PRIORITY_HIGH = 1;
14 const PRIORITY_NORMAL = 2;
15 const PRIORITY_LOW = 3;
16
17 protected $category;
18 protected $priority;
19
21 protected $smtp;
22
24 protected $callback;
25
26 protected $keepAlive;
27
28 public function __construct(array $params = null)
29 {
30 if (!empty($params))
31 {
32 foreach ($params as $name => $value)
33 {
34 $setter = sprintf('set%s', $name);
35 if (is_callable(array($this, $setter)))
36 {
37 $this->$setter($value);
38 }
39 }
40 }
41 }
42
47 public function setCategory($category)
48 {
49 $this->category = $category;
50 return $this;
51 }
52
56 public function getCategory()
57 {
58 return $this->category;
59 }
60
65 public function setSmtp(Smtp\Config $config)
66 {
67 $this->smtp = $config;
68 return $this;
69 }
70
74 public function getSmtp()
75 {
76 return $this->smtp;
77 }
78
83 public function setPriority($priority)
84 {
85 $this->priority = $priority;
86 return $this;
87 }
88
92 public function getPriority()
93 {
94 return $this->priority;
95 }
96
103 public function setCallback(Callback\Config $config)
104 {
105 $this->callback = $config;
106 return $this;
107 }
108
114 public function getCallback()
115 {
116 return $this->callback;
117 }
118
122 public function getKeepAlive(): ?string
123 {
124 return $this->keepAlive;
125 }
126
130 public function setKeepAlive(?string $keepAlive)
131 {
132 $this->keepAlive = $keepAlive;
133 }
134}
__construct(array $params=null)
Definition context.php:28
setSmtp(Smtp\Config $config)
Definition context.php:65
setKeepAlive(?string $keepAlive)
Definition context.php:130
setCallback(Callback\Config $config)
Definition context.php:103