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 statiques | |
static | isSupported () |
Fonctions membres publiques statiques hérités de FOFDatabaseDriverPdo | |
static | isSupported () |
Fonctions membres publiques statiques hérités de FOFDatabaseDriver | |
static | getConnectors () |
static | getInstance ($options=array()) |
static | splitSql ($sql) |
Fonctions membres publiques statiques hérités de FOFDatabase | |
static | getConnectors () |
static | getInstance ($options=array()) |
static | splitSql ($query) |
static | test () |
Champs de données | |
$name = 'pdomysql' | |
$serverType = 'mysql' | |
Champs de données hérités de FOFDatabaseDriverPdo | |
$name = 'pdo' | |
Champs de données hérités de FOFDatabaseDriver | |
$name | |
$serverType | |
Attributs protégés | |
$nameQuote = '`' | |
$nullDate = '0000-00-00 00:00:00' | |
Attributs protégés hérités de FOFDatabaseDriverPdo | |
$connection | |
$nameQuote = "'" | |
$nullDate = '0000-00-00 00:00:00' | |
$prepared | |
$executed = false | |
Attributs protégés hérités de FOFDatabaseDriver | |
$connection | |
$count = 0 | |
$cursor | |
$debug = false | |
$limit = 0 | |
$log = array() | |
$timings = array() | |
$callStacks = array() | |
$nameQuote | |
$nullDate | |
$offset = 0 | |
$options | |
$sql | |
$tablePrefix | |
$utf = true | |
$utf8mb4 = false | |
$errorNum = 0 | |
$errorMsg | |
$transactionDepth = 0 | |
$disconnectHandlers = array() | |
Attributs protégés statiques | |
static | $dbMinimum = '5.0.4' |
Attributs protégés statiques hérités de FOFDatabaseDriver | |
static | $instances = array() |
static | $dbMinimum |
Membres hérités additionnels | |
Fonctions membres protégées hérités de FOFDatabaseDriverPdo | |
fetchArray ($cursor=null) | |
fetchAssoc ($cursor=null) | |
fetchObject ($cursor=null, $class='stdClass') | |
freeResult ($cursor=null) | |
getErrorNumber () | |
getErrorMessage ($query) | |
Fonctions membres protégées hérités de FOFDatabaseDriver | |
fetchArray ($cursor=null) | |
fetchAssoc ($cursor=null) | |
fetchObject ($cursor=null, $class='stdClass') | |
freeResult ($cursor=null) | |
getCreateDatabaseQuery ($options, $utf) | |
getDatabase () | |
quoteNameStr ($strArr) | |
__construct | ( | $options | ) |
Constructor.
array | $options | Array of database options with keys: host, user, password, database, select. |
Pre-populate the UTF-8 Multibyte compatibility flag. Unfortunately PDO won't report the server version unless we're connected to it and we cannot connect to it unless we know if it supports utf8mb4 which requires us knowing the server version. Between this chicken and egg issue we assume it's supported and we'll just catch any problems at connection time.
Références $options.
connect | ( | ) |
Connects to the database if needed.
RuntimeException |
If the connection failed and I was trying to use the utf8mb4 charset then it is likely that the server doesn't support utf8mb4 despite claiming otherwise.
This happens on old MySQL server versions (less than 5.5.3) using the mysqlnd PHP driver. Since mysqlnd masks the server version and reports only its own we can not be sure if the server actually does support UTF-8 Multibyte (i.e. it's MySQL 5.5.3 or later). Since the utf8mb4 charset is undefined in this case we catch the error and determine that utf8mb4 is not supported!
dropTable | ( | $tableName, | |
$ifExists = true |
|||
) |
Drops a table from the database.
string | $tableName | The name of the database table to drop. |
boolean | $ifExists | Optionally specify that the table must exist before it is dropped. |
RuntimeException |
Références $query.
escape | ( | $text, | |
$extra = false |
|||
) |
Method to escape a string for usage in an SQL statement.
Oracle escaping reference: http://www.orafaq.com/wiki/SQL_FAQ#How_does_one_escape_special_characters_when_writing_SQL_queries.3F
SQLite escaping notes: http://www.sqlite.org/faq.html#q14
Method body is as implemented by the Zend Framework
Note: Using query objects with bound variables is preferable to the below.
string | $text | The string to be escaped. |
boolean | $extra | Unused optional parameter to provide extra escaping. |
Références $text.
getCollation | ( | ) |
Method to get the database collation in use by sampling a text field of a table in the database.
RuntimeException |
getConnectionCollation | ( | ) |
Method to get the database connection collation, as reported by the driver. If the connector doesn't support reporting this value please return an empty string.
getTableColumns | ( | $table, | |
$typeOnly = true |
|||
) |
getTableCreate | ( | $tables | ) |
Shows the table CREATE statement that creates the given tables.
mixed | $tables | A table name or a list of table names. |
RuntimeException |
Références $row.
getTableKeys | ( | $table | ) |
Get the details list of keys for a table.
string | $table | The name of the table. |
RuntimeException |
getTableList | ( | ) |
Method to get an array of all tables in the database.
RuntimeException |
getVersion | ( | ) |
Get the version of the database connector.
|
static |
Test to see if the MySQL connector is available.
Implémente JDatabaseInterface.
Référencé par FOFDatabaseDriver\getInstance().
lockTable | ( | $table | ) |
Locks a table in the database.
string | $table | The name of the table to unlock. |
RuntimeException |
Renames a table in the database.
string | $oldTable | The name of the table to be renamed |
string | $newTable | The new name for the table. |
string | $backup | Not used by MySQL. |
string | $prefix | Not used by MySQL. |
RuntimeException |
select | ( | $database | ) |
Select a database for use.
string | $database | The name of the database to select for use. |
RuntimeException |
transactionCommit | ( | $toSavepoint = false | ) |
Method to commit a transaction.
boolean | $toSavepoint | If true, commit to the last savepoint. |
RuntimeException |
transactionRollback | ( | $toSavepoint = false | ) |
Method to roll back a transaction.
boolean | $toSavepoint | If true, rollback to the last savepoint. |
RuntimeException |
transactionStart | ( | $asSavepoint = false | ) |
Method to initialize a transaction.
boolean | $asSavepoint | If true and a transaction is already active, a savepoint will be created. |
RuntimeException |
unlockTables | ( | ) |
Unlocks tables in the database.
RuntimeException |
|
staticprotected |
$name = 'pdomysql' |
|
protected |
|
protected |
$serverType = 'mysql' |