X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Flanguage%2Fclass_LanguageSystem.php;h=6dfbe3bb9c228121bbc01ec848cd285aeae90f5a;hp=6e775009ab3c94f6e41fdc3f8a339e00d55d511e;hb=8d8cf621bd811811cecd83c65a4ab91f27258e79;hpb=4e95c4e90f08f67f43591eaaa0c006f923d8bacf diff --git a/framework/main/classes/language/class_LanguageSystem.php b/framework/main/classes/language/class_LanguageSystem.php index 6e775009..6dfbe3bb 100644 --- a/framework/main/classes/language/class_LanguageSystem.php +++ b/framework/main/classes/language/class_LanguageSystem.php @@ -1,12 +1,15 @@ getInstance('app'); + $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); // 2) Try to build it $languageBasePath = sprintf('%s%s/language/', @@ -94,7 +97,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage, // Is the base path valid? if (empty($languageBasePath)) { // Language path is empty - throw new LanguagePathIsEmptyException($langInstance, self::EXCEPTION_UNEXPECTED_EMPTY_STRING); + throw new InvalidArgumentException('languageBasePath is still empty'); } elseif (!is_string($languageBasePath)) { // Is not a string throw new InvalidLanguagePathStringException(array($langInstance, $languageBasePath), self::EXCEPTION_INVALID_STRING); @@ -113,7 +116,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage, $langInstance->initLanguageStrings(); // Set language code from default config - $langInstance->setLanguageCode(FrameworkConfiguration::getSelfInstance()->getConfigEntry('default_lang')); + $langInstance->setLanguageCode(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_lang')); // Remember this instance self::$selfInstance = $langInstance;