public function getBuildConnection($databaseName = null)
    {
        if (null === $databaseName) {
            $databaseName = $this->get()['generator']['defaultConnection'];
        }

        if (!array_key_exists($databaseName, $this->getBuildConnections())) {
            throw new InvalidArgumentException("Invalid database name: no configured connection named `$databaseName`.");
        }

        return $this->getBuildConnections()[$databaseName];
    }
public function getBuildConnection($databaseName = null)
    {
        if (null === $databaseName) {
            $databaseName = $this->get()['generator']['defaultConnection'];
        }

        if (!array_key_exists($databaseName, $this->getBuildConnections())) {
            throw new InvalidArgumentException("Invalid database name: no configured connection named `$databaseName`.");
        }

        return $this->getBuildConnections()[$databaseName];
    }
public function getBuildConnection ( $ databaseName = null ) { if ( null === $ databaseName ) { $ databaseName = $ this -> get ( ) [ 'generator' ] [ 'defaultConnection' ] ; } if ( ! array_key_exists ( $ databaseName , $ this -> getBuildConnections ( ) ) ) { throw new InvalidArgumentException ( "Invalid database name: no configured connection named `$databaseName`." ) ; } return $ this -> getBuildConnections ( ) [ $ databaseName ] ; }
Return the connection properties array, of a given database name.
If the database name is null, it returns the default connection properties

@param  string $databaseName
@return array

@throws \Propel\Generator\Exception\InvalidArgumentException if wrong database name
Return the connection properties array of a given database name . If the database name is null it returns the default connection properties