PHP Class TeamTNT\TNTSearch\Connectors\MySqlConnector

Inheritance: extends Connector, implements TeamTNT\TNTSearch\Connectors\ConnectorInterface
Afficher le fichier Open project: teamtnt/tntsearch

Méthodes publiques

Méthode Description
connect ( array $config ) : PDO Establish a database connection.

Méthodes protégées

Méthode Description
configHasSocket ( array $config ) : boolean Determine if the given configuration array has a UNIX socket value.
getDsn ( array $config ) : string Create a DSN string from a configuration.
getHostDsn ( array $config ) : string Get the DSN string for a host / port configuration.
getSocketDsn ( array $config ) : string Get the DSN string for a socket configuration.
setModes ( PDO $connection, array $config ) : void Set the modes for the connection.

Method Details

configHasSocket() protected méthode

Determine if the given configuration array has a UNIX socket value.
protected configHasSocket ( array $config ) : boolean
$config array
Résultat boolean

connect() public méthode

Establish a database connection.
public connect ( array $config ) : PDO
$config array
Résultat PDO

getDsn() protected méthode

Chooses socket or host/port based on the 'unix_socket' config value.
protected getDsn ( array $config ) : string
$config array
Résultat string

getHostDsn() protected méthode

Get the DSN string for a host / port configuration.
protected getHostDsn ( array $config ) : string
$config array
Résultat string

getSocketDsn() protected méthode

Get the DSN string for a socket configuration.
protected getSocketDsn ( array $config ) : string
$config array
Résultat string

setModes() protected méthode

Set the modes for the connection.
protected setModes ( PDO $connection, array $config ) : void
$connection PDO
$config array
Résultat void