MySqlConnector
class MySqlConnector extends Connector implements ConnectorInterface (View source)
Traits
DetectsLostConnections |
Properties
protected array | $options | The default PDO connection options. | from Connector |
Methods
bool | causedByLostConnection(Exception $e) Determine if the given exception was caused by a lost connection. | from DetectsLostConnections |
array | getOptions(array $config) Get the PDO options based on the configuration. | from Connector |
PDO | createConnection(string $dsn, array $config, array $options) Create a new PDO connection. | from Connector |
array | getDefaultOptions() Get the default PDO connection options. | from Connector |
void | setDefaultOptions(array $options) Set the default PDO connection options. | from Connector |
PDO | tryAgainIfCausedByLostConnection(Exception $e, string $dsn, string $username, string $password, array $options) Handle a exception that occurred during connect execution. | from Connector |
PDO | connect(array $config) Establish a database connection. | |
string | getDsn(array $config) Create a DSN string from a configuration. | |
bool | configHasSocket(array $config) Determine if the given configuration array has a UNIX socket value. | |
string | getSocketDsn(array $config) Get the DSN string for a socket configuration. | |
string | getHostDsn(array $config) Get the DSN string for a host / port configuration. |
Details
protected bool causedByLostConnection(Exception $e)
Determine if the given exception was caused by a lost connection.
array getOptions(array $config)
Get the PDO options based on the configuration.
PDO createConnection(string $dsn, array $config, array $options)
Create a new PDO connection.
array getDefaultOptions()
Get the default PDO connection options.
void setDefaultOptions(array $options)
Set the default PDO connection options.
protected PDO tryAgainIfCausedByLostConnection(Exception $e, string $dsn, string $username, string $password, array $options)
Handle a exception that occurred during connect execution.
PDO connect(array $config)
Establish a database connection.
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 configHasSocket(array $config)
Determine if the given configuration array has a UNIX socket value.
protected string getSocketDsn(array $config)
Get the DSN string for a socket configuration.
protected string getHostDsn(array $config)
Get the DSN string for a host / port configuration.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Database/Connectors/MySqlConnector.html