PHP Class Pheasant\Database\ConnectionManager

Show file Open project: lox/pheasant

Public Methods

Method Description
addConnection ( $name, $dsn ) Adds a named connection, with a string dsn
addDriver ( $scheme, $class ) Adds a connection class to use for a specific scheme
changeDefault ( $default ) Sets what connection name is used when 'default' is looked up
clear ( ) Clears connections
connection ( $name ) Returns a connection

Private Methods

Method Description
_buildConnection ( Dsn $dsn ) : Connection Builds a connection object for a given Dsn

Method Details

addConnection() public method

Adds a named connection, with a string dsn
public addConnection ( $name, $dsn )

addDriver() public method

Adds a connection class to use for a specific scheme
public addDriver ( $scheme, $class )

changeDefault() public method

Sets what connection name is used when 'default' is looked up
public changeDefault ( $default )

clear() public method

Clears connections
public clear ( )

connection() public method

Returns a connection
public connection ( $name )