1 | <?php |
||
17 | class Comment extends Model |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var integer |
||
22 | */ |
||
23 | protected $id; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $text; |
||
29 | |||
30 | /** |
||
31 | * @var integer |
||
32 | */ |
||
33 | protected $ownerId; |
||
34 | |||
35 | /** |
||
36 | * @var \DateTime |
||
37 | */ |
||
38 | protected $createdAt; |
||
39 | |||
40 | |||
41 | /** |
||
42 | * Comment constructor. |
||
43 | * |
||
44 | * @param array $commentData |
||
45 | */ |
||
46 | public function __construct(array $commentData = []) |
||
65 | |||
66 | |||
67 | /** |
||
68 | * @return array |
||
69 | */ |
||
70 | public function toArray() |
||
79 | |||
80 | |||
81 | /** |
||
82 | * @return bool |
||
83 | * @throws LPTrackerSDKException |
||
84 | */ |
||
85 | public function validate() |
||
93 | |||
94 | |||
95 | /** |
||
96 | * @return int |
||
97 | */ |
||
98 | public function getId() |
||
102 | |||
103 | |||
104 | /** |
||
105 | * @return string |
||
106 | */ |
||
107 | public function getText() |
||
111 | |||
112 | |||
113 | /** |
||
114 | * @param string $text |
||
115 | * |
||
116 | * @return $this |
||
117 | */ |
||
118 | public function setText($text) |
||
124 | |||
125 | |||
126 | /** |
||
127 | * @return int |
||
128 | */ |
||
129 | public function getOwnerId() |
||
133 | |||
134 | |||
135 | /** |
||
136 | * @return \DateTime |
||
137 | */ |
||
138 | public function getCreatedAt() |
||
142 | |||
143 | |||
144 | /** |
||
145 | * @param \DateTime $createdAt |
||
146 | * |
||
147 | * @return $this |
||
148 | */ |
||
149 | public function setCreatedAt($createdAt) |
||
158 | } |