Propel 2 API
Class

Propel\Runtime\Adapter\Pdo\PdoConnection

class PdoConnection extends PDO implements ConnectionInterface

PDO extension that implements ConnectionInterface and builds statements implementing StatementInterface.

Methods

__construct($dsn, $user = null, $password = null, array $options = null)

Creates a PDO instance representing a connection to a database.

setName(string $name)

string getName()

boolean setAttribute(integer $attribute, mixed $value)

Sets a connection attribute.

Details

at line 29
public __construct($dsn, $user = null, $password = null, array $options = null)

Creates a PDO instance representing a connection to a database.

Parameters

$dsn
$user
$password
array $options

at line 40
public setName(string $name)

Parameters

string $name The datasource name associated to this connection

at line 48
public string getName()

Return Value

string The datasource name associated to this connection

at line 61
public boolean setAttribute(integer $attribute, mixed $value)

Sets a connection attribute.

This is overridden here to allow names corresponding to PDO constant names.

Parameters

integer $attribute The attribute to set (e.g. 'PDO::ATTR_CASE', or more simply 'ATTR_CASE').
mixed $value The attribute value.

Return Value

boolean TRUE on success or FALSE on failure.