1 | <?php |
||
2 | |||
3 | namespace kalanis\kw_bans\Traits; |
||
4 | |||
5 | |||
6 | use kalanis\kw_bans\Interfaces\IKBTranslations; |
||
7 | use kalanis\kw_bans\Translations; |
||
8 | |||
9 | |||
10 | trait TLang |
||
11 | { |
||
12 | protected ?IKBTranslations $iKbLang = null; |
||
13 | |||
14 | 29 | protected function setIKbLang(?IKBTranslations $iKbLang = null): void |
|
15 | { |
||
16 | 29 | $this->iKbLang = $iKbLang; |
|
17 | 29 | } |
|
18 | |||
19 | 17 | protected function getIKbLang(): IKBTranslations |
|
20 | { |
||
21 | 17 | if (empty($this->iKbLang)) { |
|
22 | 16 | $this->iKbLang = new Translations(); |
|
23 | } |
||
24 | 17 | return $this->iKbLang; |
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
25 | } |
||
26 | } |
||
27 |