DatabaseFactory
Joomla Framework Database Factory class
| since |
1.0 |
|---|---|
| package |
Joomla Framework |
Methods
getDriver
Method to return a DatabaseDriver instance based on the given options.
getDriver(string name = 'mysqli', array options = array()) : \Joomla\Database\DatabaseDriver
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.
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- name
stringName of the database driver you'd like to instantiate- options
arrayParameters to be passed to the database driver.
Response
\Joomla\Database\DatabaseDriver
getExporter
Gets an exporter class object.
getExporter(string name, \Joomla\Database\DatabaseDriver db = null) : \Joomla\Database\DatabaseExporter
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- name
stringName of the driver you want an exporter for.- db
\Joomla\Database\DatabaseDriverOptional DatabaseDriver instance to inject into the exporter.
Response
\Joomla\Database\DatabaseExporter
getImporter
Gets an importer class object.
getImporter(string name, \Joomla\Database\DatabaseDriver db = null) : \Joomla\Database\DatabaseImporter
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- name
stringName of the driver you want an importer for.- db
\Joomla\Database\DatabaseDriverOptional DatabaseDriver instance to inject into the importer.
Response
\Joomla\Database\DatabaseImporter
getInstance
Gets an instance of the factory object.
getInstance() : \Joomla\Database\DatabaseFactory
| since |
1.0 |
|---|---|
| deprecated |
1.4.0 Instantiate a new factory object as needed |
Response
\Joomla\Database\DatabaseFactory
getQuery
Get the current query object or a new Query object.
getQuery(string name, \Joomla\Database\DatabaseDriver db = null) : \Joomla\Database\DatabaseQuery
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- name
stringName of the driver you want an query object for.- db
\Joomla\Database\DatabaseDriverOptional Driver instance
Response
\Joomla\Database\DatabaseQuery
setInstance
Gets an instance of a factory object to return on subsequent calls of getInstance.
setInstance(\Joomla\Database\DatabaseFactory instance = null) : void
| since |
1.0 |
|---|---|
| deprecated |
1.4.0 Instantiate a new factory object as needed |
Arguments
- instance
\Joomla\Database\DatabaseFactoryA Factory object.
Properties
instance
Contains the current Factory instance
| since |
1.0 |
|---|---|
| deprecated |
1.4.0 Instantiate a new factory object as needed |
Type(s)
\Joomla\Database\DatabaseFactory