Make sure backend configs will not be missing at backend creation time

This commit is contained in:
Thomas Gelf 2013-10-22 20:46:55 +00:00
parent 385488c5df
commit 9a8ae4c92a

View File

@ -159,7 +159,7 @@ class Backend implements ConfigAwareFactory, DatasourceInterface
} }
$config = null; $config = null;
self::getBackendConfigs();
if (isset(self::$backendConfigs[$name])) { if (isset(self::$backendConfigs[$name])) {
/** @var Zend_Config $config */ /** @var Zend_Config $config */
$config = self::$backendConfigs[$name]; $config = self::$backendConfigs[$name];
@ -174,7 +174,10 @@ class Backend implements ConfigAwareFactory, DatasourceInterface
); );
} }
self::$backendInstances[$name] = $backend = new self($config, ResourceFactory::getResourceConfig($config->resource)); self::$backendInstances[$name] = $backend = new self(
$config,
ResourceFactory::getResourceConfig($config->resource)
);
switch (strtolower($config->type)) { switch (strtolower($config->type)) {
case 'ido': case 'ido':
if ($backend->getResource()->getDbType() !== 'oracle') { if ($backend->getResource()->getDbType() !== 'oracle') {