src/Database/Model.php
private function getConfigDB(ConfigInterface $config): ConfigInterface
    {
        // get current connection
        $connection = $this->getConnection();
        // Get config of required connection
        $config_db = $config->get($connection);
        try {
            if (null === $config_db) {
                throw new Exception("Connection \"$connection\" is not found in database config");
            }
        } catch (Exception $e) {
            // __constructor
        }
        return $config_db;
    }
private function getConfigDB(ConfigInterface $config): ConfigInterface
    {
        // get current connection
        $connection = $this->getConnection();
        // Get config of required connection
        $config_db = $config->get($connection);
        try {
            if (null === $config_db) {
                throw new Exception("Connection \"$connection\" is not found in database config");
            }
        } catch (Exception $e) {
            // __constructor
        }
        return $config_db;
    }
private function getConfigDB ( ConfigInterface $ config ) : ConfigInterface { // get current connection $ connection = $ this -> getConnection ( ) ; // Get config of required connection $ config_db = $ config -> get ( $ connection ) ; try { if ( null === $ config_db ) { throw new Exception ( "Connection \"$connection\" is not found in database config" ) ; } } catch ( Exception $ e ) { // __constructor } return $ config_db ; }
Extract configuration of current database

@param   ConfigInterface $config
@return  ConfigInterface
Extract configuration of current database