1 | <?php |
||
5 | abstract class TwilioMessage |
||
6 | { |
||
7 | /** |
||
8 | * The message content. |
||
9 | * |
||
10 | * @var string |
||
11 | */ |
||
12 | public $content; |
||
13 | |||
14 | /** |
||
15 | * The phone number the message should be sent from. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | public $from; |
||
20 | |||
21 | /** |
||
22 | * @var null|string |
||
23 | */ |
||
24 | public $statusCallback = null; |
||
25 | |||
26 | /** |
||
27 | * @var null|string |
||
28 | */ |
||
29 | public $statusCallbackMethod = null; |
||
30 | |||
31 | /** |
||
32 | * Create a message object. |
||
33 | * @param string $content |
||
34 | * @return static |
||
35 | */ |
||
36 | public static function create($content = '') |
||
40 | |||
41 | /** |
||
42 | * Create a new message instance. |
||
43 | * |
||
44 | * @param string $content |
||
45 | */ |
||
46 | public function __construct($content = '') |
||
50 | |||
51 | /** |
||
52 | * Set the message content. |
||
53 | * |
||
54 | * @param string $content |
||
55 | * @return $this |
||
56 | */ |
||
57 | public function content($content) |
||
63 | |||
64 | /** |
||
65 | * Set the phone number the message should be sent from. |
||
66 | * |
||
67 | * @param string $from |
||
68 | * @return $this |
||
69 | */ |
||
70 | public function from($from) |
||
76 | |||
77 | /** |
||
78 | * Get the from address. |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | public function getFrom() |
||
86 | |||
87 | /** |
||
88 | * Set the status callback. |
||
89 | * |
||
90 | * @param string $statusCallback |
||
91 | * @return $this |
||
92 | */ |
||
93 | public function statusCallback($statusCallback) |
||
99 | |||
100 | /** |
||
101 | * Set the status callback request method. |
||
102 | * |
||
103 | * @param string $statusCallbackMethod |
||
104 | * @return $this |
||
105 | */ |
||
106 | public function statusCallbackMethod($statusCallbackMethod) |
||
112 | } |
||
113 |