Browse Source

add localeKeyExists method #14

main
ghost 1 year ago
parent
commit
fe48055f82
  1. 15
      src/app/model/locale.php

15
src/app/model/locale.php

@ -19,6 +19,19 @@ class AppModelLocale { @@ -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…
Cancel
Save