1 | <?php namespace Arcanesoft\Seo\Models\Presenters; |
||
12 | trait MetaPresenter |
||
13 | { |
||
14 | /* ----------------------------------------------------------------- |
||
15 | | Accessors |
||
16 | | ----------------------------------------------------------------- |
||
17 | */ |
||
18 | /** |
||
19 | * Get the `title_status` attribute. |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | public function getTitleStatusAttribute() |
||
27 | |||
28 | /** |
||
29 | * Get the `description_status` attribute. |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | public function getDescriptionStatusAttribute() |
||
37 | |||
38 | /* ----------------------------------------------------------------- |
||
39 | | Other Methods |
||
40 | | ----------------------------------------------------------------- |
||
41 | */ |
||
42 | /** |
||
43 | * Get a label status by a given key. |
||
44 | * |
||
45 | * @param string $status |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | protected function getLabelStatus($status) |
||
59 | } |
||
60 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: