src/main/php/config/PropertyBasedDatabaseConfigurations.php
public function get(string $id)
    {
        if (!$this->properties()->containSection($id)) {
            if (!$this->hasFallback()) {
                throw new \OutOfBoundsException('No database configuration known for database requested with id ' . $id);
            }

            $id = DatabaseConfiguration::DEFAULT_ID;
        }

        if (!$this->properties()->containValue($id, 'dsn')) {
            throw new \LogicException('Missing dsn property in database configuration with id ' . $id);
        }

        return DatabaseConfiguration::fromArray(
                $id,
                $this->properties()->value($id, 'dsn'),
                $this->properties()->section($id)
        );
    }
public function get(string $id)
    {
        if (!$this->properties()->containSection($id)) {
            if (!$this->hasFallback()) {
                throw new \OutOfBoundsException('No database configuration known for database requested with id ' . $id);
            }

            $id = DatabaseConfiguration::DEFAULT_ID;
        }

        if (!$this->properties()->containValue($id, 'dsn')) {
            throw new \LogicException('Missing dsn property in database configuration with id ' . $id);
        }

        return DatabaseConfiguration::fromArray(
                $id,
                $this->properties()->value($id, 'dsn'),
                $this->properties()->section($id)
        );
    }
public function get ( string $ id ) { if ( ! $ this -> properties ( ) -> containSection ( $ id ) ) { if ( ! $ this -> hasFallback ( ) ) { throw new \ OutOfBoundsException ( 'No database configuration known for database requested with id ' . $ id ) ; } $ id = DatabaseConfiguration :: DEFAULT_ID ; } if ( ! $ this -> properties ( ) -> containValue ( $ id , 'dsn' ) ) { throw new \ LogicException ( 'Missing dsn property in database configuration with id ' . $ id ) ; } return DatabaseConfiguration :: fromArray ( $ id , $ this -> properties ( ) -> value ( $ id , 'dsn' ) , $ this -> properties ( ) -> section ( $ id ) ) ; }
returns database configuration with given id

@param   string  $id
@return  \stubbles\db\config\DatabaseConfiguration
@throws  \OutOfBoundsException  in case no configuration for given id is found and fallback is disabled
@throws  \LogicException  in case the found configuration misses the dsn property
returns database configuration with given id