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