Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
getDriver ($name='mysqli', $options=array()) | |
getExporter ($name, JDatabaseDriver $db=null) | |
getImporter ($name, JDatabaseDriver $db=null) | |
getQuery ($name, JDatabaseDriver $db=null) | |
Fonctions membres publiques statiques | |
static | getInstance () |
static | setInstance (JDatabaseFactory $instance=null) |
Attributs privés statiques | |
static | $_instance = null |
Joomla Platform Database Factory class
getDriver | ( | $name = 'mysqli' , |
|
$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.
string | $name | Name of the database driver you'd like to instantiate |
array | $options | Parameters to be passed to the database driver. |
RuntimeException |
getExporter | ( | $name, | |
JDatabaseDriver | $db = null |
||
) |
Gets an exporter class object.
string | $name | Name of the driver you want an exporter for. |
JDatabaseDriver | $db | Optional JDatabaseDriver instance |
RuntimeException |
getImporter | ( | $name, | |
JDatabaseDriver | $db = null |
||
) |
Gets an importer class object.
string | $name | Name of the driver you want an importer for. |
JDatabaseDriver | $db | Optional JDatabaseDriver instance |
RuntimeException |
|
static |
getQuery | ( | $name, | |
JDatabaseDriver | $db = null |
||
) |
Get the current query object or a new JDatabaseQuery object.
string | $name | Name of the driver you want an query object for. |
JDatabaseDriver | $db | Optional JDatabaseDriver instance |
RuntimeException |
|
static |
Gets an instance of a factory object to return on subsequent calls of getInstance.
JDatabaseFactory | $instance | A JDatabaseFactory object. |
|
staticprivate |