1 | <?php |
||
5 | class Every8dMessage |
||
6 | { |
||
7 | /** |
||
8 | * The message subject. |
||
9 | * |
||
10 | * @var string |
||
11 | */ |
||
12 | public $subject = null; |
||
13 | |||
14 | /** |
||
15 | * The message content. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | public $content; |
||
20 | |||
21 | /** |
||
22 | * Create a new message instance. |
||
23 | * |
||
24 | * @param string $content |
||
25 | * @return void |
||
|
|||
26 | */ |
||
27 | 6 | public function __construct($content = '') |
|
31 | |||
32 | /** |
||
33 | * Set the message subject. |
||
34 | * |
||
35 | * @param string $subject |
||
36 | * @return $this |
||
37 | */ |
||
38 | 2 | public function subject($subject) |
|
44 | |||
45 | /** |
||
46 | * Set the message subject. |
||
47 | * |
||
48 | * @param string $content |
||
49 | * @return $this |
||
50 | */ |
||
51 | 1 | public function content($content) |
|
57 | |||
58 | /** |
||
59 | * Create a new message instance. |
||
60 | * |
||
61 | * @param string $content |
||
62 | * |
||
63 | * @return static |
||
64 | */ |
||
65 | 2 | public static function create($content) |
|
69 | } |
||
70 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.