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é
Référence de la classe JDatabaseFactory

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
 

Description détaillée

Joomla Platform Database Factory class

Depuis
3.0.0

Documentation des fonctions membres

◆ getDriver()

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.

Paramètres
string$nameName of the database driver you'd like to instantiate
array$optionsParameters to be passed to the database driver.
Renvoie
JDatabaseDriver A database driver object.
Depuis
3.0.0
Exceptions
RuntimeException

Références $class, $name, $options, et null.

◆ getExporter()

getExporter (   $name,
JDatabaseDriver  $db = null 
)

Gets an exporter class object.

Paramètres
string$nameName of the driver you want an exporter for.
JDatabaseDriver$dbOptional JDatabaseDriver instance
Renvoie
JDatabaseExporter An exporter object.
Depuis
3.0.0
Exceptions
RuntimeException

Références $class, $db, et $name.

◆ getImporter()

getImporter (   $name,
JDatabaseDriver  $db = null 
)

Gets an importer class object.

Paramètres
string$nameName of the driver you want an importer for.
JDatabaseDriver$dbOptional JDatabaseDriver instance
Renvoie
JDatabaseImporter An importer object.
Depuis
3.0.0
Exceptions
RuntimeException

Références $class, $db, et $name.

◆ getInstance()

static getInstance ( )
static

Gets an instance of the factory object.

Renvoie
JDatabaseFactory
Depuis
3.0.0

◆ getQuery()

getQuery (   $name,
JDatabaseDriver  $db = null 
)

Get the current query object or a new JDatabaseQuery object.

Paramètres
string$nameName of the driver you want an query object for.
JDatabaseDriver$dbOptional JDatabaseDriver instance
Renvoie
JDatabaseQuery The current query object or a new object extending the JDatabaseQuery class.
Depuis
3.0.0
Exceptions
RuntimeException

Références $class, $db, et $name.

◆ setInstance()

static setInstance ( JDatabaseFactory  $instance = null)
static

Gets an instance of a factory object to return on subsequent calls of getInstance.

Paramètres
JDatabaseFactory$instanceA JDatabaseFactory object.
Renvoie
void
Depuis
3.0.0

Documentation des champs

◆ $_instance

$_instance = null
staticprivate

La documentation de cette classe a été générée à partir du fichier suivant :