1 | <?php |
||
12 | class BlogArticle extends Entity |
||
13 | { |
||
14 | |||
15 | use AppTranslateTrait; |
||
16 | use TranslateTrait; |
||
17 | |||
18 | /** |
||
19 | * Fields that can be mass assigned using newEntity() or patchEntity(). |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $_accessible = [ |
||
24 | '*' => true, |
||
25 | 'id' => false, |
||
26 | ]; |
||
27 | |||
28 | /** |
||
29 | * Purify the content for display the article. |
||
30 | * |
||
31 | * @param string $content The content to be purified. |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | protected function _getContent($content) |
||
44 | |||
45 | /** |
||
46 | * Purify the content for display the article on category/archives/index blog page. |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | protected function _getContentEmpty() |
||
59 | |||
60 | /** |
||
61 | * Purify the content for display the article in meta tags. |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | protected function _getContentMeta() |
||
74 | |||
75 | /** |
||
76 | * Get the last page of an article. |
||
77 | * |
||
78 | * @return int |
||
79 | */ |
||
80 | protected function _getLastPage() |
||
86 | |||
87 | /** |
||
88 | * Get the number of comments formatted. |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | protected function _getCommentCountFormat() |
||
96 | |||
97 | /** |
||
98 | * Get the number of likes formatted. |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | protected function _getLikeCountFormat() |
||
106 | } |
||
107 |
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.