프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_connections | |||
$_defaultConnection | |||
$_typeHandlers |
메소드 | 설명 | |
---|---|---|
__construct ( ) | ||
addConnection ( string $name, string $dsn, array $options = [], $default = false ) : Spot_Adapter_Interface | Add database connection | |
connection ( string $name = null ) : Spot_Adapter_Interface | Get connection by name | |
defaultConnection ( ) : Spot_Adapter_Interface | Get default connection | |
serialize ( ) | Default serialization behavior is to not attempt to serialize stored adapter connections at all (thanks @TheSavior re: Issue #7) | |
typeHandler ( string $type, $class = null ) : Spot_Adapter_Interface | Get type handler class by type | |
unserialize ( $serialized ) |
public addConnection ( string $name, string $dsn, array $options = [], $default = false ) : Spot_Adapter_Interface | ||
$name | string | Unique name for the connection |
$dsn | string | DSN string for this connection |
$options | array | Array of key => value options for adapter |
리턴 | Spot_Adapter_Interface | Spot adapter instance |
public connection ( string $name = null ) : Spot_Adapter_Interface | ||
$name | string | Unique name of the connection to be returned |
리턴 | Spot_Adapter_Interface | Spot adapter instance |
public defaultConnection ( ) : Spot_Adapter_Interface | ||
리턴 | Spot_Adapter_Interface | Spot adapter instance |
public serialize ( ) |
public static typeHandler ( string $type, $class = null ) : Spot_Adapter_Interface | ||
$type | string | Field type (i.e. 'string' or 'int', etc.) |
리턴 | Spot_Adapter_Interface | Spot adapter instance |