public function db($database = null)
    {
        if (empty($database)) {
            $database = $this->database;
        }
        return $this->silex['dbs'][$database];
    }
public function db($database = null)
    {
        if (empty($database)) {
            $database = $this->database;
        }
        return $this->silex['dbs'][$database];
    }
public function db ( $ database = null ) { if ( empty ( $ database ) ) { $ database = $ this -> database ; } return $ this -> silex [ 'dbs' ] [ $ database ] ; }
Gets dbal engine.

@param string $database :  Database to use, check config to see available sources.
default is the default source.

@return \Doctrine\DBAL\Connection
Gets dbal engine .