1 | <?php |
||
5 | class SMS77Message |
||
6 | { |
||
7 | protected $payload = []; |
||
8 | |||
9 | /** |
||
10 | * @param string $message |
||
11 | */ |
||
12 | public function __construct(string $message = '') |
||
17 | |||
18 | /** |
||
19 | * Get the payload value for a given key. |
||
20 | * |
||
21 | * @param string $key |
||
22 | * |
||
23 | * @return mixed|null |
||
24 | */ |
||
25 | public function getPayloadValue(string $key) |
||
29 | |||
30 | /** |
||
31 | * Return new SMS77Message object. |
||
32 | * |
||
33 | * @param string $message |
||
34 | */ |
||
35 | public static function create(string $message = ''): self |
||
39 | |||
40 | /** |
||
41 | * Returns if recipient number is given or not. |
||
42 | * |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function hasToNumber(): bool |
||
49 | |||
50 | /** |
||
51 | * Return payload. |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | public function toArray(): array |
||
59 | |||
60 | /** |
||
61 | * Set message content. |
||
62 | * |
||
63 | * @param string $message |
||
64 | */ |
||
65 | public function content(string $message): self |
||
71 | |||
72 | /** |
||
73 | * Set recipient phone number. |
||
74 | * |
||
75 | * @param string $to |
||
76 | */ |
||
77 | public function to(string $to): self |
||
83 | |||
84 | /** |
||
85 | * Set sender name. |
||
86 | * |
||
87 | * @param string $from |
||
88 | */ |
||
89 | public function from(string $from): self |
||
95 | |||
96 | /** |
||
97 | * Set notification delay. |
||
98 | * |
||
99 | * @param string $timestamp |
||
100 | */ |
||
101 | public function delay(string $timestamp): self |
||
107 | |||
108 | /** |
||
109 | * Disable reload lock. |
||
110 | */ |
||
111 | public function noReload(): self |
||
117 | |||
118 | /** |
||
119 | * Activate debug mode. |
||
120 | */ |
||
121 | public function debug(): self |
||
127 | |||
128 | /** |
||
129 | * Set encoding to unicode. |
||
130 | */ |
||
131 | public function unicode(): self |
||
137 | |||
138 | /** |
||
139 | * SMS is sent as flash message. |
||
140 | */ |
||
141 | public function flash(): self |
||
147 | |||
148 | /** |
||
149 | * The API returns more details about the SMS sent. |
||
150 | */ |
||
151 | public function details(): self |
||
157 | } |
||
158 |