mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
add localeKeyExists method #14
This commit is contained in:
parent
d955446b99
commit
fe48055f82
1 changed files with 14 additions and 1 deletions
|
|
@ -19,6 +19,19 @@ class AppModelLocale {
|
||||||
|
|
||||||
public function getLocales() : object
|
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…
Add table
Add a link
Reference in a new issue