1 | <?php |
||
14 | class Line extends Model |
||
15 | { |
||
16 | use BaseTranslatable, Translatable; |
||
17 | |||
18 | public $table = 'squanto_lines'; |
||
19 | 36 | public $translatedAttributes = ['value']; |
|
20 | |||
21 | 36 | /** |
|
22 | * @param $key |
||
23 | 36 | * @return Line |
|
24 | 36 | */ |
|
25 | 36 | public static function make($key) |
|
38 | |||
39 | 12 | /** |
|
40 | 3 | * @param $key |
|
41 | * @return Line |
||
42 | */ |
||
43 | 12 | public static function findOrCreateByKey($key) |
|
51 | |||
52 | /** |
||
53 | 30 | * Save a translated value |
|
54 | * |
||
55 | 30 | * @param $locale |
|
56 | * @param $value |
||
57 | 30 | * @return $this |
|
58 | */ |
||
59 | public function saveValue($locale, $value) |
||
65 | |||
66 | /** |
||
67 | * Save a translated value |
||
68 | * |
||
69 | * @param $locale |
||
70 | * @return $this |
||
71 | */ |
||
72 | public function removeValue($locale) |
||
78 | 24 | ||
79 | /** |
||
80 | 24 | * @param null $locale |
|
81 | * @param bool $fallback |
||
82 | * @return string |
||
83 | */ |
||
84 | public function getValue($locale = null, $fallback = true) |
||
88 | |||
89 | public static function findValue($key, $locale) |
||
97 | |||
98 | 39 | /** |
|
99 | * @param $key |
||
100 | * @return mixed |
||
101 | 12 | */ |
|
102 | public static function findByKey($key) |
||
106 | |||
107 | public function saveSuggestedType() |
||
117 | |||
118 | public function editInEditor() |
||
122 | |||
123 | public function editInTextarea() |
||
127 | |||
128 | public function editInTextinput() |
||
132 | |||
133 | /** |
||
134 | * Get key - value pairs for all lines per locale |
||
135 | * |
||
136 | * @param $locale |
||
137 | * @return mixed |
||
138 | */ |
||
139 | public static function getValuesByLocale($locale) |
||
150 | } |
||
151 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write 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.