mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-23 13:14:17 +00:00
add localeKeyExists method #14
This commit is contained in:
parent
d955446b99
commit
fe48055f82
@ -19,6 +19,19 @@ class AppModelLocale {
|
||||
|
||||
public function getLocales() : object
|
||||
{
|
||||
return $this->_locales;
|
||||
return (object) $this->_locales;
|
||||
}
|
||||
|
||||
public function localeKeyExists(string $key) : bool
|
||||
{
|
||||
foreach ($this->_locales as $locale)
|
||||
{
|
||||
if ($locale->key === $key)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user