strValues = array(); $this->moduleName = "displayNone"; } /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Set strValues * * @param array $strValues * * @return LinguisticaTradItem */ public function setStrValues($strValues) { $this->strValues = $strValues; return $this; } /** * Add strValues * * @param string $strValue * @param string $locale * @return LinguisticaTradItem * */ public function addStrValues($strValue, $locale) { $this->strValues[$locale] = $strValue; return $this; } /** * Get strValues * * @return array */ public function getStrValues() { return $this->strValues; } /** * Get strValue * * @param $locale * @return array|bool */ public function getStrValue($locale) { if(isset($this->strValues[$locale])) return $this->strValues[$locale]; else return false; } public function show($locale) { if(isset($this->strValues[$locale]) && $this->strValues[$locale] !='') return $this->strValues[$locale]; else if(isset($this->strValues['en']) && $this->strValues['en'] !='') return $this->strValues['en']; else { foreach ($this->strValues as $lang => $text) if($text != '') return $text; } return ''; } /** * Set moduleName * * @param string $moduleName * * @return LinguisticaTradItem */ public function setModuleName($moduleName) { $this->moduleName = $moduleName; return $this; } /** * Get moduleName * * @return string */ public function getModuleName() { return $this->moduleName; } public function getPublicKey(): string { return $this->publicKey; } public function getClass(){ return str_replace('\\', '~', __CLASS__); } public function setPublicKey(?string $publicKey): self { $this->publicKey = $publicKey; return $this; } }