| 1 | <?php  | 
            ||
| 5 | class SmscRuMessage  | 
            ||
| 6 | { | 
            ||
| 7 | /**  | 
            ||
| 8 | * The phone number the message should be sent from.  | 
            ||
| 9 | *  | 
            ||
| 10 | * @var string  | 
            ||
| 11 | */  | 
            ||
| 12 | public $from = '';  | 
            ||
| 13 | |||
| 14 | /**  | 
            ||
| 15 | * The message content.  | 
            ||
| 16 | *  | 
            ||
| 17 | * @var string  | 
            ||
| 18 | */  | 
            ||
| 19 | public $content = '';  | 
            ||
| 20 | |||
| 21 | /**  | 
            ||
| 22 | * The receiver's phone number  | 
            ||
| 23 | *  | 
            ||
| 24 | * @var array  | 
            ||
| 25 | */  | 
            ||
| 26 | public $to = [];  | 
            ||
| 27 | |||
| 28 | /**  | 
            ||
| 29 | * Time of sending a message.  | 
            ||
| 30 | *  | 
            ||
| 31 | * @var \DateTimeInterface  | 
            ||
| 32 | */  | 
            ||
| 33 | public $sendAt;  | 
            ||
| 34 | |||
| 35 | 4 | /**  | 
            |
| 36 | * Create a new message instance.  | 
            ||
| 37 | 4 | *  | 
            |
| 38 | * @param string $content  | 
            ||
| 39 | *  | 
            ||
| 40 | * @return static  | 
            ||
| 41 | */  | 
            ||
| 42 | public static function create($content = '')  | 
            ||
| 46 | 8 | ||
| 47 | /**  | 
            ||
| 48 | * @param string $content  | 
            ||
| 49 | */  | 
            ||
| 50 | public function __construct($content = '')  | 
            ||
| 54 | |||
| 55 | 1 | /**  | 
            |
| 56 | * Set the message content.  | 
            ||
| 57 | 1 | *  | 
            |
| 58 | * @param string $content  | 
            ||
| 59 | 1 | *  | 
            |
| 60 | * @return $this  | 
            ||
| 61 | */  | 
            ||
| 62 | public function content($content)  | 
            ||
| 68 | |||
| 69 | 4 | /**  | 
            |
| 70 | * Set the phone number or sender name the message should be sent from.  | 
            ||
| 71 | 4 | *  | 
            |
| 72 | * @param string $from  | 
            ||
| 73 | 4 | *  | 
            |
| 74 | * @return $this  | 
            ||
| 75 | */  | 
            ||
| 76 | public function from($from)  | 
            ||
| 82 | |||
| 83 | 2 | /**  | 
            |
| 84 | * Set the receiver's phone number.  | 
            ||
| 85 | 2 | *  | 
            |
| 86 | * @param string|array $to  | 
            ||
| 87 | 2 | *  | 
            |
| 88 | * @return $this  | 
            ||
| 89 | */  | 
            ||
| 90 | public function to($to)  | 
            ||
| 100 | |||
| 101 | /**  | 
            ||
| 102 | * Set the time the message should be sent.  | 
            ||
| 103 | *  | 
            ||
| 104 | * @param \DateTimeInterface|null $sendAt  | 
            ||
| 105 | *  | 
            ||
| 106 | * @return $this  | 
            ||
| 107 | */  | 
            ||
| 108 | public function sendAt(\DateTimeInterface $sendAt = null)  | 
            ||
| 114 | }  | 
            ||
| 115 |