application->configuration()->getValue($this->configurationKey) as $identifier => $configuration) { if (empty($configuration["type"])) // Undefined database type, throwing an exception. throw new UndefinedDatabaseTypeException($identifier); // Create the factory with the given configuration. $factories[$identifier] = new $configuration["type"]($identifier, $configuration); } return $factories; // Return loaded factories. } }