class Illuminate / Database / Connectors / Connector
You are viewing an older version of the documentation. For the latest, please visit master documentation.

Connector

Uses

Properties

protected

$options array

The default PDO connection options.

Default: array

Methods

public

createConnection ( $dsn , array $config , array $options ) : PDO

Create a new PDO connection.

Parameters

  • $dsn string
  • $config array
  • $options array
protected

createPdoConnection ( $dsn , $username , $password , $options ) : PDO

Create a new PDO connection instance.

Parameters

  • $dsn string
  • $username string
  • $password string
  • $options array
protected

isPersistentConnection ( $options ) : bool

Determine if the connection is persistent.

Parameters

  • $options array
protected

tryAgainIfCausedByLostConnection ( Throwable $e , $dsn , $username , $password , $options ) : PDO

Handle an exception that occurred during connect execution.

Parameters

  • $e Throwable
  • $dsn string
  • $username string
  • $password string
  • $options array
public

getOptions ( array $config ) : array

Get the PDO options based on the configuration.

Parameters

  • $config array
public

getDefaultOptions ( ) : array

Get the default PDO connection options.

public

setDefaultOptions ( array $options ) : void

Set the default PDO connection options.

Parameters

  • $options array