1 | <?php |
||
18 | class CommentPresenter extends AbstractPresenter |
||
19 | { |
||
20 | use TimestampsTrait; |
||
21 | |||
22 | /** |
||
23 | * Renders the message from Markdown into HTML. |
||
24 | * |
||
25 | * @return string |
||
26 | */ |
||
27 | public function formattedMessage() |
||
31 | |||
32 | /** |
||
33 | * Formats the created_at time ready to be used by bootstrap-datetimepicker. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function created_at_datetimepicker() |
||
41 | |||
42 | /** |
||
43 | * Returns a formatted timestamp for use within the timeline. |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function timestamp_formatted() |
||
51 | |||
52 | /** |
||
53 | * Return the iso timestamp for use within the timeline. |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function timestamp_iso() |
||
58 | { |
||
59 | return $this->created_at_iso; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Convert the presenter instance to an array. |
||
64 | * |
||
65 | * @return string[] |
||
66 | */ |
||
67 | public function toArray() |
||
74 | } |
||
75 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.