Joomla CMS  3.9.25 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.9.25 et du framework Joomla Platform intégré
Référence de la classe FOFDatabaseInstaller

Fonctions membres publiques

 __construct ($config=array())
 
 setXmlDirectory ($xmlDirectory)
 
 getXmlDirectory ()
 

Champs de données

 $xmlFiles = array('mysql', 'mysqli', 'pdomysql', 'postgresql', 'sqlsrv', 'mssql')
 

Fonctions membres protégées

 conditionMet ($table, SimpleXMLElement $node)
 

Attributs protégés

 $input = array()
 

Attributs protégés statiques

static $allTables = array()
 

Fonctions membres privées

 getTableCollation ($tableName)
 
 realGetTableCollation ($tableName)
 
 getColumnCollation ($tableName, $columnName)
 
 realGetColumnCollation ($tableName, $columnName)
 
 convertUtf8mb4QueryToUtf8 ($query)
 
 convertUtf8QueryToUtf8mb4 ($query)
 
 extractTablesToConvert ($query, &$tables)
 
 convertTablesToUtf8mb4 ($tablesToConvert)
 
 hasIndex ($tableName, $indexName)
 

Attributs privés

 $db = null
 
 $xmlDirectory = null
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $config = array())

Public constructor

Paramètres
array$configThe configuration array

Références $component, $config, $files, elseif, FOFPlatform\getInstance(), et setXmlDirectory().

Documentation des fonctions membres

◆ conditionMet()

conditionMet (   $table,
SimpleXMLElement  $node 
)
protected

Checks if a condition is met

Paramètres
string$tableThe table we're operating on
SimpleXMLElement$nodeThe condition definition node
Renvoie
bool

Références $attributes, $condition, $parts, $query, $type, $value, getColumnCollation(), getTableCollation(), hasIndex(), et null.

◆ convertTablesToUtf8mb4()

convertTablesToUtf8mb4 (   $tablesToConvert)
private

Converts the collation of tables listed in $tablesToConvert to utf8mb4_unicode_ci

Paramètres
array$tablesToConvertThe list of tables to convert
Renvoie
void

Références $parts, $query, et getTableCollation().

◆ convertUtf8mb4QueryToUtf8()

convertUtf8mb4QueryToUtf8 (   $query)
private

Automatically downgrade a CREATE TABLE or ALTER TABLE query from utf8mb4 (UTF-8 Multibyte) to plain utf8.

We use our own method so we can be site it works even on Joomla! 3.4 or earlier, where UTF8MB4 support is not implemented.

Paramètres
string$queryThe query to convert
Renvoie
string The converted query

Références $query.

◆ convertUtf8QueryToUtf8mb4()

convertUtf8QueryToUtf8mb4 (   $query)
private

Automatically upgrade a CREATE TABLE or ALTER TABLE query from plain utf8 to utf8mb4 (UTF-8 Multibyte).

Paramètres
string$queryThe query to convert
Renvoie
string The converted query

Références $query.

◆ extractTablesToConvert()

extractTablesToConvert (   $query,
$tables 
)
private

Analyzes a query. If it's a CREATE TABLE query the table is added to the $tables array.

Paramètres
string$queryThe query to analyze
string$tablesThe array where the name of the detected table is added
Renvoie
void

The table name may be quoted. Since UTF8MB4 is only supported in MySQL, the table name can only be quoted with surrounding backticks. Therefore we can trim backquotes from the table name to unquote it!

Références $parts, et $query.

◆ getColumnCollation()

getColumnCollation (   $tableName,
  $columnName 
)
private

Get the collation of a column. Uses an internal cache for efficiency.

Paramètres
string$tableNameThe name of the table
string$columnNameThe name of the column
Renvoie
string The collation, e.g. "utf8_general_ci"

Références realGetColumnCollation().

Référencé par conditionMet().

◆ getTableCollation()

getTableCollation (   $tableName)
private

Get the collation of a table. Uses an internal cache for efficiency.

Paramètres
string$tableNameThe name of the table
Renvoie
string The collation, e.g. "utf8_general_ci"

Références realGetTableCollation().

Référencé par conditionMet(), convertTablesToUtf8mb4(), et realGetColumnCollation().

◆ getXmlDirectory()

getXmlDirectory ( )

Returns the directory where XML schema files are stored

Renvoie
string

Références $xmlDirectory.

◆ hasIndex()

hasIndex (   $tableName,
  $indexName 
)
private

Returns true if table $tableName has an index named $indexName or if it's impossible to retrieve index names for the table (not enough privileges, not a MySQL database, ...)

Paramètres
string$tableNameThe name of the table
string$indexNameThe name of the index
Renvoie
bool

Références $query, et null.

Référencé par conditionMet().

◆ realGetColumnCollation()

realGetColumnCollation (   $tableName,
  $columnName 
)
private

Get the collation of a column. This is the internal method used by getColumnCollation.

Paramètres
string$tableNameThe name of the table
string$columnNameThe name of the column
Renvoie
string The collation, e.g. "utf8_general_ci"

Références $query, $row, et getTableCollation().

Référencé par getColumnCollation().

◆ realGetTableCollation()

realGetTableCollation (   $tableName)
private

Get the collation of a table. This is the internal method used by getTableCollation.

Paramètres
string$tableNameThe name of the table
Renvoie
string The collation, e.g. "utf8_general_ci"

Références $query, et $row.

Référencé par getTableCollation().

◆ setXmlDirectory()

setXmlDirectory (   $xmlDirectory)

Sets the directory where XML schema files are stored

Paramètres
string$xmlDirectory

Références $xmlDirectory.

Référencé par __construct().

Documentation des champs

◆ $allTables

$allTables = array()
staticprotected

◆ $db

$db = null
private

◆ $input

$input = array()
protected

◆ $xmlDirectory

$xmlDirectory = null
private

Référencé par getXmlDirectory(), et setXmlDirectory().

◆ $xmlFiles

$xmlFiles = array('mysql', 'mysqli', 'pdomysql', 'postgresql', 'sqlsrv', 'mssql')

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