1 | <?php |
||
10 | abstract class AbstractMessage extends Attribute |
||
11 | { |
||
12 | /** |
||
13 | * Message type. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $type; |
||
18 | |||
19 | /** |
||
20 | * Message id. |
||
21 | * |
||
22 | * @var int |
||
23 | */ |
||
24 | protected $id; |
||
25 | |||
26 | /** |
||
27 | * Message target user open id. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $to; |
||
32 | |||
33 | /** |
||
34 | * Message sender open id. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $from; |
||
39 | |||
40 | /** |
||
41 | * Message attributes. |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $properties = []; |
||
46 | |||
47 | /** |
||
48 | * Return type name message. |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getType() |
||
56 | |||
57 | /** |
||
58 | * Magic getter. |
||
59 | * |
||
60 | * @param string $property |
||
61 | * |
||
62 | * @return mixed |
||
63 | */ |
||
64 | public function __get($property) |
||
72 | |||
73 | /** |
||
74 | * Magic setter. |
||
75 | * |
||
76 | * @param string $property |
||
77 | * @param mixed $value |
||
78 | * |
||
79 | * @return AbstractMessage |
||
80 | */ |
||
81 | public function __set($property, $value) |
||
91 | } |
||
92 |