MySqlConnector
class MySqlConnector extends Connector implements ConnectorInterface (View source)
Traits
Properties
protected array | $options | The default PDO connection options. |
from Connector |
Methods
Determine if the given exception was caused by a lost connection.
Create a new PDO connection.
Create a new PDO connection instance.
Handle an exception that occurred during connect execution.
Create a DSN string from a configuration.
Determine if the given configuration array has a UNIX socket value.
Get the DSN string for a socket configuration.
Get the DSN string for a host / port configuration.
Details
protected bool
causedByLostConnection(Throwable $e)
Determine if the given exception was caused by a lost connection.
protected PDO
createPdoConnection(string $dsn, string $username, string $password, array $options)
Create a new PDO connection instance.
protected PDO
tryAgainIfCausedByLostConnection(Throwable $e, string $dsn, string $username, string $password, array $options)
Handle an exception that occurred during connect execution.
protected string
getDsn(array $config)
Create a DSN string from a configuration.
Chooses socket or host/port based on the 'unix_socket' config value.
protected bool
hasSocket(array $config)
Determine if the given configuration array has a UNIX socket value.
protected void
configureConnection(PDO $connection, array $config)
Configure the given PDO connection.