public static function create($database = [])
    {
        try {
            $driver = isset($database['driver']) ? ucwords($database['driver']) : "";
            $className = __NAMESPACE__ . "\\Engines\\" . $driver;
            if (class_exists($className)) {
                return new $className($database);
            } else {
                throw new \RuntimeException("Unidentified connection engine $className.");
            }
        } catch (\PDOException $e) {
            throw new \RuntimeException('Problem connecting to the database: ' . $e->getMessage());
        }
    }
public static function create($database = [])
    {
        try {
            $driver = isset($database['driver']) ? ucwords($database['driver']) : "";
            $className = __NAMESPACE__ . "\\Engines\\" . $driver;
            if (class_exists($className)) {
                return new $className($database);
            } else {
                throw new \RuntimeException("Unidentified connection engine $className.");
            }
        } catch (\PDOException $e) {
            throw new \RuntimeException('Problem connecting to the database: ' . $e->getMessage());
        }
    }
public static function create ( $ database = [ ] ) { try { $ driver = isset ( $ database [ 'driver' ] ) ? ucwords ( $ database [ 'driver' ] ) : "" ; $ className = __NAMESPACE__ . "\\Engines\\" . $ driver ; if ( class_exists ( $ className ) ) { return new $ className ( $ database ) ; } else { throw new \ RuntimeException ( "Unidentified connection engine $className." ) ; } } catch ( \ PDOException $ e ) { throw new \ RuntimeException ( 'Problem connecting to the database: ' . $ e -> getMessage ( ) ) ; } }
Starts database connection

@param array $database

@return connection instance
Starts database connection