PHP Class Pheasant\Database\Mysqli\Connection

Show file Open project: lox/pheasant Class Usage Examples

Public Properties

Property Type Description
$counter
$timer

Public Methods

Method Description
__construct ( Dsn $dsn ) Constructor
binder ( ) : Binder
charset ( ) : string The charset used by the database connection
close ( ) Closes a connection
connect ( ) Forces a connection, re-connects if already connected
execute ( $sql, $params = [] ) : ResultSet Executes a statement
filterChain ( ) : FilterChain Returns the internal filter chain
platform ( ) Returns a platform object representing the database type connected to
selectDatabase ( $database ) Selects a particular database
selectedDatabase ( ) : string Returns the selected database
sequencePool ( ) : SequencePool
table ( $name ) : Table
transaction ( $callback = null ) : Transaction

Private Methods

Method Description
_mysqli ( ) : MySQLi Lazily creates the internal mysqli object

Method Details

__construct() public method

Constructor
public __construct ( Dsn $dsn )
$dsn Pheasant\Database\Dsn

binder() public method

public binder ( ) : Binder
return Binder

charset() public method

The charset used by the database connection
public charset ( ) : string
return string

close() public method

Closes a connection
public close ( )

connect() public method

Forces a connection, re-connects if already connected
public connect ( )

execute() public method

Executes a statement
public execute ( $sql, $params = [] ) : ResultSet
return ResultSet

filterChain() public method

Returns the internal filter chain
public filterChain ( ) : FilterChain
return Pheasant\Database\FilterChain

platform() public method

Returns a platform object representing the database type connected to
public platform ( )

selectDatabase() public method

Selects a particular database
public selectDatabase ( $database )

selectedDatabase() public method

Returns the selected database
public selectedDatabase ( ) : string
return string

sequencePool() public method

public sequencePool ( ) : SequencePool
return SequencePool

table() public method

public table ( $name ) : Table
return Table

transaction() public method

public transaction ( $callback = null ) : Transaction
return Transaction

Property Details

$counter public static property

public static $counter

$timer public static property

public static $timer