JDatabaseFactory::getDriver
Method to return a JDatabaseDriver instance based on the given options. There are three global options and then the rest are specific to the database driver. The 'database' option determines which database is to be used for the connection. The 'select' option determines whether the connector should automatically select the chosen database.
Instances are unique to the given options and new objects are only created when a unique options array is passed into the method. This ensures that we don't end up with unnecessary database connection resources.
Signature
public function getDriver([string
$name = 'mysqli',
array
$options] )
Parameters
-
$name
- Name of the database driver you'd like to instantiate
-
$options
- Parameters to be passed to the database driver.
Returns
- JDatabaseDriver
- A database driver object.