|
| $xmlFiles = array('mysql', 'mysqli', 'pdomysql', 'postgresql', 'sqlsrv', 'mssql') |
|
◆ __construct()
__construct |
( |
|
$config = array() | ) |
|
◆ conditionMet()
conditionMet |
( |
|
$table, |
|
|
SimpleXMLElement |
$node |
|
) |
| |
|
protected |
◆ convertTablesToUtf8mb4()
convertTablesToUtf8mb4 |
( |
|
$tablesToConvert | ) |
|
|
private |
Converts the collation of tables listed in $tablesToConvert to utf8mb4_unicode_ci
- Paramètres
-
array | $tablesToConvert | The 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 | $query | The 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 | $query | The 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 | $query | The query to analyze |
string | $tables | The 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 | $tableName | The name of the table |
string | $columnName | The 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 |
◆ 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 | $tableName | The name of the table |
string | $indexName | The 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 | $tableName | The name of the table |
string | $columnName | The 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 | $tableName | The 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 | ) |
|
◆ $allTables
◆ $db
◆ $input
◆ $xmlDirectory
◆ $xmlFiles
$xmlFiles = array('mysql', 'mysqli', 'pdomysql', 'postgresql', 'sqlsrv', 'mssql') |
La documentation de cette classe a été générée à partir du fichier suivant :