MySqlConnectionProvider
class MySqlConnectionProvider extends GenericConnectionProvider (View source)
Basic connection provider for MySQL databases.
Methods
__construct(string $hostname, string $database, string $username, string $password)
MySqlConnectionProvider constructor.
getConnection()
Provides the active PDO connection and initializes it if necessary.
initializeConnection()
Initializes the PDO connection when first requested.
string
getDataSourceName(string $hostname, string $database)
Returns the data source name based on the hostname and the database.
array
getOptions()
Returns the default PDO options to use for the connection.
Details
at line 20
__construct(string $hostname, string $database, string $username, string $password)
MySqlConnectionProvider constructor.
PDO
getConnection()
Provides the active PDO connection and initializes it if necessary.
protected PDO
initializeConnection()
Initializes the PDO connection when first requested.
at line 31
protected string
getDataSourceName(string $hostname, string $database)
Returns the data source name based on the hostname and the database.
at line 50
protected array
getOptions()
Returns the default PDO options to use for the connection.