PHP 클래스 TeamTNT\TNTSearch\Connectors\MySqlConnector

상속: extends Connector, implements TeamTNT\TNTSearch\Connectors\ConnectorInterface
파일 보기 프로젝트 열기: teamtnt/tntsearch

공개 메소드들

메소드 설명
connect ( array $config ) : PDO Establish a database connection.

보호된 메소드들

메소드 설명
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.

메소드 상세

configHasSocket() 보호된 메소드

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

connect() 공개 메소드

Establish a database connection.
public connect ( array $config ) : PDO
$config array
리턴 PDO

getDsn() 보호된 메소드

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

getHostDsn() 보호된 메소드

Get the DSN string for a host / port configuration.
protected getHostDsn ( array $config ) : string
$config array
리턴 string

getSocketDsn() 보호된 메소드

Get the DSN string for a socket configuration.
protected getSocketDsn ( array $config ) : string
$config array
리턴 string

setModes() 보호된 메소드

Set the modes for the connection.
protected setModes ( PDO $connection, array $config ) : void
$connection PDO
$config array
리턴 void