@@ -28,6 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | protected $defaultLocale; |
30 | 30 | |
31 | + /** |
|
32 | + * @param string $locale |
|
33 | + */ |
|
31 | 34 | public function translate(?string $locale = null, bool $withFallback = false): ?Model |
32 | 35 | { |
33 | 36 | return $this->getTranslation($locale, $withFallback); |
@@ -148,6 +151,9 @@ discard block |
||
148 | 151 | return null; |
149 | 152 | } |
150 | 153 | |
154 | + /** |
|
155 | + * @param string $key |
|
156 | + */ |
|
151 | 157 | public function getAttribute($key) |
152 | 158 | { |
153 | 159 | list($attribute, $locale) = $this->getAttributeAndLocale($key); |
@@ -172,6 +178,10 @@ discard block |
||
172 | 178 | return parent::getAttribute($key); |
173 | 179 | } |
174 | 180 | |
181 | + /** |
|
182 | + * @param string $key |
|
183 | + * @param string $value |
|
184 | + */ |
|
175 | 185 | public function setAttribute($key, $value) |
176 | 186 | { |
177 | 187 | list($attribute, $locale) = $this->getAttributeAndLocale($key); |