|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace NotificationChannels\Smsapi; |
|
4
|
|
|
|
|
5
|
|
|
use NotificationChannels\Smsapi\Exceptions\ExceptionFactory; |
|
6
|
|
|
|
|
7
|
|
|
class SmsapiVmsMessage extends SmsapiMessage |
|
8
|
|
|
{ |
|
9
|
|
|
/** |
|
10
|
|
|
* @param string $file |
|
11
|
|
|
* @return self |
|
12
|
|
|
*/ |
|
13
|
5 |
|
public function file($file) |
|
14
|
|
|
{ |
|
15
|
5 |
|
ExceptionFactory::assertArgumentType(1, __METHOD__, 'string', $file); |
|
16
|
1 |
|
$this->data['file'] = $file; |
|
17
|
|
|
|
|
18
|
1 |
|
return $this; |
|
19
|
|
|
} |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* @param string $tts |
|
23
|
|
|
* @return self |
|
24
|
|
|
*/ |
|
25
|
5 |
|
public function tts($tts) |
|
26
|
|
|
{ |
|
27
|
5 |
|
ExceptionFactory::assertArgumentType(1, __METHOD__, 'string', $tts); |
|
28
|
1 |
|
$this->data['tts'] = $tts; |
|
29
|
|
|
|
|
30
|
1 |
|
return $this; |
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @param string $ttsLector |
|
35
|
|
|
* @return self |
|
36
|
|
|
*/ |
|
37
|
5 |
|
public function ttsLector($ttsLector) |
|
38
|
|
|
{ |
|
39
|
5 |
|
ExceptionFactory::assertArgumentType(1, __METHOD__, 'string', $ttsLector); |
|
40
|
1 |
|
$this->data['tts_lector'] = $ttsLector; |
|
41
|
|
|
|
|
42
|
1 |
|
return $this; |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* @param string $from |
|
47
|
|
|
* @return self |
|
48
|
|
|
*/ |
|
49
|
5 |
|
public function from($from) |
|
50
|
|
|
{ |
|
51
|
5 |
|
ExceptionFactory::assertArgumentType(1, __METHOD__, 'string', $from); |
|
52
|
1 |
|
$this->data['from'] = $from; |
|
53
|
|
|
|
|
54
|
1 |
|
return $this; |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @param int $tries |
|
59
|
|
|
* @return self |
|
60
|
|
|
*/ |
|
61
|
5 |
|
public function tries($tries) |
|
62
|
|
|
{ |
|
63
|
5 |
|
ExceptionFactory::assertArgumentType(1, __METHOD__, 'integer', $tries); |
|
64
|
1 |
|
$this->data['tries'] = $tries; |
|
65
|
|
|
|
|
66
|
1 |
|
return $this; |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @param int $interval |
|
71
|
|
|
* @return self |
|
72
|
|
|
*/ |
|
73
|
5 |
|
public function interval($interval) |
|
74
|
|
|
{ |
|
75
|
5 |
|
ExceptionFactory::assertArgumentType(1, __METHOD__, 'integer', $interval); |
|
76
|
1 |
|
$this->data['interval'] = $interval; |
|
77
|
|
|
|
|
78
|
1 |
|
return $this; |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* @param bool $skipGsm |
|
83
|
|
|
* @return self |
|
84
|
|
|
*/ |
|
85
|
7 |
|
public function skipGsm($skipGsm = true) |
|
86
|
|
|
{ |
|
87
|
7 |
|
ExceptionFactory::assertArgumentType(1, __METHOD__, 'boolean', $skipGsm); |
|
88
|
3 |
|
$this->data['skip_gsm'] = $skipGsm; |
|
89
|
|
|
|
|
90
|
3 |
|
return $this; |
|
91
|
|
|
} |
|
92
|
|
|
} |
|
93
|
|
|
|