lists = $lists; } /** * Validate locale code. Code must be in the list of allowed locales. * * @param string $localeCode * @return bool * * @api */ public function isValid($localeCode) { $isValid = true; $allowedLocaleCodes = array_keys($this->lists->getLocaleList()); if (!$localeCode || !in_array($localeCode, $allowedLocaleCodes)) { $isValid = false; } return $isValid; } }