JDatabaseFactory
class JDatabaseFactory
Joomla Platform Database Factory class
Methods
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.
Gets an instance of the factory object.
Get the current query object or a new JDatabaseQuery object.
Gets an instance of a factory object to return on subsequent calls of getInstance.
Details
JDatabaseDriver
getDriver(
string $name = 'mysqli',
array $options = array())
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.
JDatabaseExporter
getExporter(
string $name,
JDatabaseDriver $db = null)
Gets an exporter class object.
JDatabaseImporter
getImporter(
string $name,
JDatabaseDriver $db = null)
Gets an importer class object.
JDatabaseQuery
getQuery(
string $name,
JDatabaseDriver $db = null)
Get the current query object or a new JDatabaseQuery object.
static
void
setInstance(
JDatabaseFactory $instance = null)
Gets an instance of a factory object to return on subsequent calls of getInstance.