spoof
 All Data Structures Namespaces Files Functions Variables Pages
IPool Interface Reference
Inheritance diagram for IPool:

Static Public Member Functions

static add (IConnection $conn, $name)
static getByName ($name, $connect=TRUE)
static closeAll ()

Detailed Description

Database connection pool interface. This interface is used to define database connection pool.


Member Function Documentation

static add ( IConnection  $conn,
  $name 
)
static

Adds the specified connection to the connection pool and assigns the specified alias.

Parameters:
IConnection$conndatabase connection object
string$namename alias for the connection
Exceptions:
\InvalidArgumentExceptionwhen supplied alias already exists

Implemented in Pool.

static closeAll ( )
static

Closes all active connections in the pool.

Implemented in Pool.

static getByName (   $name,
  $connect = TRUE 
)
static

Retrieves previously stored database connection object by its alias.

Parameters:
string$nameconnection name
boolean$connectif TRUE and not yet connected the database connection will be attempted, default TRUE
Returns:
Connection object
Exceptions:
\InvalidArgumentExceptionwhen supplied alias is not found in the pool

Implemented in Pool.


The documentation for this interface was generated from the following file: