alex-kalanis /
upload-per-partes
| 1 | <?php |
||
| 2 | |||
| 3 | namespace kalanis\UploadPerPartes\Traits; |
||
| 4 | |||
| 5 | |||
| 6 | use kalanis\UploadPerPartes\Interfaces\IUppTranslations; |
||
| 7 | use kalanis\UploadPerPartes\Uploader\Translations; |
||
| 8 | |||
| 9 | |||
| 10 | /** |
||
| 11 | * Trait TLang |
||
| 12 | * @package kalanis\UploadPerPartes\Traits |
||
| 13 | * Translations |
||
| 14 | */ |
||
| 15 | trait TLang |
||
| 16 | { |
||
| 17 | protected ?IUppTranslations $uppLang = null; |
||
| 18 | |||
| 19 | 237 | public function setUppLang(?IUppTranslations $lang = null): self |
|
| 20 | { |
||
| 21 | 237 | $this->uppLang = $lang; |
|
| 22 | 237 | return $this; |
|
| 23 | } |
||
| 24 | |||
| 25 | 103 | public function getUppLang(): IUppTranslations |
|
| 26 | { |
||
| 27 | 103 | if (empty($this->uppLang)) { |
|
| 28 | 97 | $this->uppLang = new Translations(); |
|
| 29 | } |
||
| 30 | 103 | return $this->uppLang; |
|
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 31 | } |
||
| 32 | } |
||
| 33 |