Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques statiques | |
static | isSupported () |
Fonctions membres publiques statiques hérités de DatabaseDriver | |
static | getInstance (array $options=[]) |
static | splitSql ($sql) |
Champs de données | |
$name = 'mysqli' | |
Champs de données hérités de DatabaseDriver | |
$serverType | |
Fonctions membres protégées | |
getCreateDatabaseQuery ($options, $utf) | |
executeUnpreparedQuery ($sql) | |
prepareStatement (string $query) | |
Fonctions membres protégées hérités de DatabaseDriver | |
dispatchEvent (EventInterface $event) | |
fetchArray () | |
fetchAssoc () | |
fetchObject () | |
freeResult () | |
getAlterDbCharacterSet ($dbName) | |
getCreateDatabaseQuery ($options, $utf) | |
getDatabase () | |
prepareStatement (string $query) | |
quoteNameString ($name, $asSinglePart=false) | |
quoteNameStr ($strArr) | |
Attributs protégés | |
$connection | |
$nameQuote = '`' | |
$nullDate = '0000-00-00 00:00:00' | |
$utf8mb4 = false | |
$mariadb = false | |
Attributs protégés hérités de DatabaseDriver | |
$name | |
$connection | |
$count = 0 | |
$cursor | |
$executed = false | |
$limit = 0 | |
$nameQuote | |
$nullDate | |
$offset = 0 | |
$options | |
$sql | |
$statement | |
$tablePrefix | |
$utf = true | |
$errorNum = 0 | |
$errorMsg | |
$transactionDepth = 0 | |
$factory | |
$monitor | |
Attributs protégés statiques | |
static | $dbMinimum = '5.6' |
static | $dbMinMariadb = '10.0' |
Attributs protégés statiques hérités de DatabaseDriver | |
static | $connectors = [] |
static | $instances = [] |
static | $dbMinimum |
Fonctions membres privées | |
serverClaimsUtf8mb4Support () | |
__construct | ( | array | $options | ) |
Constructor.
array | $options | List of options used to configure the connection |
sql_mode to MySql 5.7.8+ default strict mode minus ONLY_FULL_GROUP_BY
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-8.html#mysqld-5-7-8-sql-mode
Références DatabaseDriver\$options, Symfony\Contracts\Service\__construct(), et null.
connect | ( | ) |
Connects to the database if needed.
Implémente DatabaseInterface.
Références $this, elseif, null, et MysqliDriver\select().
Référencé par MysqliDriver\escape(), MysqliDriver\executeUnpreparedQuery(), MysqliDriver\getCollation(), MysqliDriver\getConnectionCollation(), MysqliDriver\getConnectionEncryption(), MysqliDriver\getTableColumns(), MysqliDriver\getTableCreate(), MysqliDriver\getTableKeys(), MysqliDriver\getTableList(), MysqliDriver\getVersion(), MysqliDriver\insertid(), MysqliDriver\isConnectionEncryptionSupported(), MysqliDriver\isMariaDb(), MysqliDriver\select(), MysqliDriver\setUtf(), MysqliDriver\transactionCommit(), MysqliDriver\transactionRollback(), et MysqliDriver\transactionStart().
connected | ( | ) |
Determines if the connection to the server is active.
Implémente DatabaseInterface.
Référencé par MysqliDriver\executeUnpreparedQuery().
convertUtf8mb4QueryToUtf8 | ( | $query | ) |
Automatically downgrade a CREATE TABLE or ALTER TABLE query from utf8mb4 (UTF-8 Multibyte) to plain utf8.
Used when the server doesn't support UTF-8 Multibyte.
string | $query | The query to convert |
Implémente UTF8MB4SupportInterface.
Références $query.
disconnect | ( | ) |
escape | ( | $text, | |
$extra = false |
|||
) |
Method to escape a string for usage in an SQL statement.
string | $text | The string to be escaped. |
boolean | $extra | Optional parameter to provide extra escaping. |
Implémente DatabaseInterface.
Références $result, $text, et MysqliDriver\connect().
Référencé par MysqliDriver\getTableColumns(), et MysqliDriver\getTableCreate().
|
protected |
Internal method to execute queries which cannot be run as prepared statements.
string | $sql | SQL statement to execute. |
Références DatabaseDriver\$cursor, DatabaseDriver\$errorMsg, DatabaseDriver\$errorNum, DatabaseDriver\$sql, MysqliDriver\connect(), MysqliDriver\connected(), DatabaseDriver\freeResult(), et null.
Référencé par MysqliDriver\lockTable(), MysqliDriver\transactionRollback(), et MysqliDriver\unlockTables().
getAlterDbCharacterSet | ( | $dbName | ) |
Return the query string to alter the database character set.
string | $dbName | The database name |
Références DatabaseDriver\quoteName().
getCollation | ( | ) |
Method to get the database collation in use by sampling a text field of a table in the database.
Implémente DatabaseInterface.
Références MysqliDriver\connect(), et DatabaseDriver\setQuery().
getConnectionCollation | ( | ) |
Method to get the database connection collation in use by sampling a text field of a table in the database.
Implémente DatabaseInterface.
Références MysqliDriver\connect(), et DatabaseDriver\setQuery().
getConnectionEncryption | ( | ) |
Method to get the database encryption details (cipher and protocol) in use.
Implémente DatabaseInterface.
Références MysqliDriver\connect(), et DatabaseDriver\setQuery().
|
protected |
Return the query string to create new Database.
stdClass | $options | Object used to pass user and database name to database driver. This object must have "db_name" and "db_user" set. |
boolean | $utf | True if the database supports the UTF-8 character set. |
Références DatabaseDriver\$options, DatabaseDriver\$utf, et DatabaseDriver\quoteName().
getMinimum | ( | ) |
getNullDate | ( | ) |
Get the null or zero representation of a timestamp for the database driver.
Implémente DatabaseInterface.
Références MysqliDriver\$nullDate.
getTableColumns | ( | $table, | |
$typeOnly = true |
|||
) |
Retrieves field information about a given table.
string | $table | The name of the database table. |
boolean | $typeOnly | True to only return field types. |
Implémente DatabaseInterface.
Références $field, $fields, $result, MysqliDriver\connect(), MysqliDriver\escape(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
Référencé par MysqliDriver\insertObject().
getTableCreate | ( | $tables | ) |
Shows the table CREATE statement that creates the given tables.
mixed | $tables | A table name or a list of table names. |
Références $result, MysqliDriver\connect(), MysqliDriver\escape(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
getTableKeys | ( | $table | ) |
Get the details list of keys for a table.
string | $table | The name of the table. |
Implémente DatabaseInterface.
Références MysqliDriver\connect(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
getTableList | ( | ) |
Method to get an array of all tables in the database.
Implémente DatabaseInterface.
Références MysqliDriver\connect(), et DatabaseDriver\setQuery().
getVersion | ( | ) |
Get the version of the database connector.
Implémente DatabaseInterface.
Références MysqliDriver\connect().
Référencé par MysqliDriver\serverClaimsUtf8mb4Support().
hasUTF8mb4Support | ( | ) |
Determine whether the database engine support the UTF-8 Multibyte (utf8mb4) character encoding.
Références MysqliDriver\$utf8mb4.
insertid | ( | ) |
Method to get the auto-incremented value from the last INSERT statement.
Implémente DatabaseInterface.
Références MysqliDriver\connect().
Référencé par MysqliDriver\insertObject().
insertObject | ( | $table, | |
& | $object, | ||
$key = null |
|||
) |
Inserts a row into a table based on an object's properties.
string | $table | The name of the database table to insert into. |
object | $object | A reference to an object whose public properties match the table fields. |
string | $key | The name of the primary key. If provided the object property is updated. |
Implémente DatabaseInterface.
Références $fields, $id, $key, $query, DatabaseDriver\getQuery(), MysqliDriver\getTableColumns(), MysqliDriver\insertid(), null, DatabaseDriver\quote(), DatabaseDriver\quoteName(), et DatabaseDriver\setQuery().
isConnectionEncryptionSupported | ( | ) |
Method to test if the database TLS connections encryption are supported.
Implémente DatabaseInterface.
Références MysqliDriver\connect(), et DatabaseDriver\setQuery().
isMariaDb | ( | ) |
Determine if the database engine is MariaDB.
Références MysqliDriver\$mariadb, et MysqliDriver\connect().
|
static |
Test to see if the MySQLi connector is available.
Implémente DatabaseInterface.
lockTable | ( | $table | ) |
Locks a table in the database.
string | $table | The name of the table to unlock. |
Implémente DatabaseInterface.
Références $this, MysqliDriver\executeUnpreparedQuery(), DatabaseDriver\quoteName(), et DatabaseDriver\replacePrefix().
|
protected |
Prepares a SQL statement for execution
string | $query | The SQL query to be prepared. |
PrepareStatementFailureException |
Références $query.
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. |
Implémente DatabaseInterface.
Références $this, et DatabaseDriver\setQuery().
select | ( | $database | ) |
Select a database for use.
string | $database | The name of the database to select for use. |
Implémente DatabaseInterface.
Références DatabaseDriver\$database, et MysqliDriver\connect().
Référencé par MysqliDriver\connect().
|
private |
Does the database server claim to have support for UTF-8 Multibyte (utf8mb4) collation?
libmysql supports utf8mb4 since 5.5.3 (same version as the MySQL server). mysqlnd supports utf8mb4 since 5.0.9.
Références MysqliDriver\getVersion().
setUtf | ( | ) |
Set the connection to use UTF-8 character encoding.
Références $result, et MysqliDriver\connect().
transactionCommit | ( | $toSavepoint = false | ) |
Method to commit a transaction.
boolean | $toSavepoint | If true, commit to the last savepoint. |
Implémente DatabaseInterface.
Références MysqliDriver\connect().
transactionRollback | ( | $toSavepoint = false | ) |
Method to roll back a transaction.
boolean | $toSavepoint | If true, rollback to the last savepoint. |
Implémente DatabaseInterface.
Références MysqliDriver\connect(), MysqliDriver\executeUnpreparedQuery(), et DatabaseDriver\quoteName().
transactionStart | ( | $asSavepoint = false | ) |
Method to initialize a transaction.
boolean | $asSavepoint | If true and a transaction is already active, a savepoint will be created. |
Implémente DatabaseInterface.
Références DatabaseDriver\$transactionDepth, et MysqliDriver\connect().
unlockTables | ( | ) |
Unlocks tables in the database.
Implémente DatabaseInterface.
Références $this, et MysqliDriver\executeUnpreparedQuery().
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
Référencé par MysqliDriver\isMariaDb().
$name = 'mysqli' |
|
protected |
|
protected |
Référencé par MysqliDriver\getNullDate().
|
protected |
Référencé par MysqliDriver\hasUTF8mb4Support().