Remove APP_CORE_NAME related obsolete code.

This commit is contained in:
Greyscale 2020-08-24 18:58:21 +02:00
parent b4ea0ad8a6
commit 870152c6df
3 changed files with 6 additions and 10 deletions

View file

@ -348,9 +348,6 @@ class App
} else {
self::$instance = $tempApp;
}
if (!defined('APP_CORE_NAME')) {
define('APP_CORE_NAME', get_class(self::$instance));
}
}
return self::$instance;
@ -468,7 +465,11 @@ class App
protected function interrogateTranslations(): void
{
foreach (new \DirectoryIterator(APP_ROOT.'/src/Strings') as $translationFile) {
$stringPath = APP_ROOT.'/src/Strings';
if(!file_exists($stringPath)){
return;
}
foreach (new \DirectoryIterator($stringPath) as $translationFile) {
if ('yaml' == $translationFile->getExtension()) {
$languageName = substr($translationFile->getBasename(), 0, -5);
$this->addSupportedLanguage($languageName);

View file

@ -31,9 +31,6 @@ abstract class BaseTestCase extends TestCase
{
parent::__construct($name, $data, $dataName);
// @var \Slim\App $app
if (!defined('APP_CORE_NAME')) {
throw new \Exception('You must define APP_CORE_NAME in bootstrap.php. This must be the same as the core app container in /src');
}
// Force Kint into CLI mode.
\Kint::$mode_default = \Kint::MODE_CLI;

View file

@ -65,9 +65,7 @@ trait DatabaseAccessTrait
*/
private static function getAppObject()
{
$coreAppName = APP_CORE_NAME;
return $coreAppName::Instance(false);
return \Benzine\App::Instance(false);
}
/**