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é
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe InstallationModelDatabase
+ Graphe d'héritage de InstallationModelDatabase:

Fonctions membres publiques

 initialise ($options)
 
 createDatabase ($options)
 
 handleOldDatabase ($options)
 
 createTables ($options)
 
 installSampleData ($options)
 
 installCmsData ($options)
 
 backupDatabase ($db, $prefix)
 
 createDb ($db, $options, $utf)
 
 deleteDatabase ($db, $prefix)
 
 populateDatabase ($db, $schema)
 
 setDatabaseCharset ($db, $name)
 
- Fonctions membres publiques hérités de JModelBase
 __construct (Registry $state=null)
 
 getState ()
 
 setState (Registry $state)
 

Fonctions membres publiques statiques

static resetRandUserId ()
 
static getUserId ()
 

Fonctions membres protégées

 postInstallSampleData ($db, $sampleFileName='')
 
 postInstallCmsData ($db)
 
 updateUserIds ($db)
 
 updateDates ($db)
 
 splitQueries ($query)
 
- Fonctions membres protégées hérités de JModelBase
 loadState ()
 

Fonctions membres protégées statiques

static generateRandUserId ()
 

Attributs protégés statiques

static $userId = 0
 

Membres hérités additionnels

- Attributs protégés hérités de JModelBase
 $state
 

Description détaillée

Database configuration model for the Joomla Core Installer.

Depuis
3.1

Documentation des fonctions membres

◆ backupDatabase()

backupDatabase (   $db,
  $prefix 
)

Method to backup all tables in a database with a given prefix.

Paramètres
JDatabaseDriver$dbJDatabaseDriver object.
string$prefixDatabase table prefix.
Renvoie
boolean True on success.
Depuis
3.1

Références $db, $prefix, et $return.

◆ createDatabase()

createDatabase (   $options)

Method to create a new database.

Paramètres
array$optionsThe configuration options
Renvoie
boolean True on success.
Depuis
3.1

Références $db, $i, $option, $options, $type, elseif, et JDatabaseDriver\getInstance().

◆ createDb()

createDb (   $db,
  $options,
  $utf 
)

Method to create a new database.

Paramètres
JDatabaseDriver$dbJDatabase object.
JObject$optionsJObject coming from "initialise" function to pass user and database name to database driver.
boolean$utfTrue if the database supports the UTF-8 character set.
Renvoie
boolean True on success.
Depuis
3.1

Références $db, et $options.

◆ createTables()

createTables (   $options)

Method to create the database tables.

Paramètres
array$optionsThe options array.
Renvoie
boolean True on success.
Depuis
3.1

Références $db, $extension, $file, $files, $options, $params, $query, $return, $type, $version, elseif, JPATH_ADMINISTRATOR, et json_encode.

◆ deleteDatabase()

deleteDatabase (   $db,
  $prefix 
)

Method to delete all tables in a database with a given prefix.

Paramètres
JDatabaseDriver$dbJDatabaseDriver object.
string$prefixDatabase table prefix.
Renvoie
boolean True on success.
Depuis
3.1

Références $db, $prefix, et $return.

◆ generateRandUserId()

static generateRandUserId ( )
staticprotected

Generates the user ID.

Renvoie
integer The user ID.
Depuis
3.1

◆ getUserId()

static getUserId ( )
static

Retrieves the default user ID and sets it if necessary.

Renvoie
integer The user ID.
Depuis
3.1

Références $userId.

Référencé par InstallationModelConfiguration\createRootUser().

◆ handleOldDatabase()

handleOldDatabase (   $options)

Method to process the old database.

Paramètres
array$optionsThe options array.
Renvoie
boolean True on success.
Depuis
3.1

Références $db, et $options.

◆ initialise()

initialise (   $options)

Method to initialise the database.

Paramètres
array$optionsThe options to use for configuration.
Renvoie
JDatabaseDriver|boolean Database object on success, boolean false on failure
Depuis
3.1

Références $lang, $options, InstallationHelperDatabase\getDbo(), JPATH_ADMINISTRATOR, et JPATH_INSTALLATION.

◆ installCmsData()

installCmsData (   $options)

Method to install the cms data.

Paramètres
array$optionsThe options array.
Renvoie
boolean True on success.
Depuis
3.6.1

Références $db, et $options.

◆ installSampleData()

installSampleData (   $options)

Method to install the sample data.

Paramètres
array$optionsThe options array.
Renvoie
boolean True on success.
Depuis
3.1

Références $data, $db, $options, $type, elseif, et JPATH_INSTALLATION.

◆ populateDatabase()

populateDatabase (   $db,
  $schema 
)

Method to import a database schema from a file.

Paramètres
JDatabaseDriver$dbJDatabase object.
string$schemaPath to the schema file.
Renvoie
boolean True on success.
Depuis
3.1

If we don't have UTF-8 Multibyte support we'll have to convert queries to plain UTF-8

Note: the JDatabaseDriver::convertUtf8mb4QueryToUtf8 performs the conversion ONLY when necessary, so there's no need to check the conditions in JInstaller.

This is a query which was supposed to convert tables to utf8mb4 charset but the server doesn't support utf8mb4. Therefore we don't have to run it, it has no effect and it's a mere waste of time.

Références $buffer, $db, $query, et $return.

◆ postInstallCmsData()

postInstallCmsData (   $db)
protected

Cms tables and data post install process.

Paramètres
JDatabaseDriver$dbDatabase connector object $db*.
Renvoie
void
Depuis
3.6.1

Références $db.

◆ postInstallSampleData()

postInstallSampleData (   $db,
  $sampleFileName = '' 
)
protected

Sample data tables and data post install process.

Paramètres
JDatabaseDriver$dbDatabase connector object $db*.
string$sampleFileNameThe sample dats filename.
Renvoie
void
Depuis
3.1

Références $db.

◆ resetRandUserId()

static resetRandUserId ( )
static

Resets the user ID.

Renvoie
void
Depuis
3.1

Références $userId.

Référencé par InstallationModelConfiguration\createRootUser().

◆ setDatabaseCharset()

setDatabaseCharset (   $db,
  $name 
)

Method to set the database character set to UTF-8.

Paramètres
JDatabaseDriver$dbJDatabaseDriver object.
string$nameName of the database to process.
Renvoie
boolean True on success.
Depuis
3.1

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

◆ splitQueries()

splitQueries (   $query)
protected

Method to split up queries from a schema file into an array.

Paramètres
string$querySQL schema.
Renvoie
array Queries to perform.
Depuis
3.1

Références $buffer, $i, $query, et elseif.

◆ updateDates()

updateDates (   $db)
protected

Method to update the dates of sql data content to the current date.

Paramètres
JDatabaseDriver$dbDatabase connector object $db*.
Renvoie
void
Depuis
3.7.0

Références $currentDate, $db, $field, $fields, et $query.

◆ updateUserIds()

updateUserIds (   $db)
protected

Method to update the user id of sql data content to the new rand user id.

Paramètres
JDatabaseDriver$dbDatabase connector object $db*.
Renvoie
void
Depuis
3.6.1

Références $db, $field, $fields, $query, et $userId.

Documentation des champs

◆ $userId

$userId = 0
staticprotected

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