\Gishiki\Database\Adapters\Utils\ConnectionParserConnectionParserInterface

Describe the implementation of a connection string parser.

Summary

Methods
Constants
parse()
getPDOConnection()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

parse()

parse(string  $connection) 

Parse the given connection string.

The given connection string cannot contains dbtype://, but can either be in standard or PDO format.

Parameters

string $connection

the connection string

Throws

\Gishiki\Database\Adapters\ConnectionParser\ConnectionParserException

the error preventing parsing

\InvalidArgumentException

the connection parameter is not a valid string

getPDOConnection()

getPDOConnection() : array

Get the list of arguments to be passed to the PDO constructor in order to connect the specified database.

Returns

array —

the list of arguments to be passed to the pdo driver