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 = 'pdo' | |
Champs de données hérités de DatabaseDriver | |
$serverType | |
Fonctions membres protégées | |
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' | |
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 | |
Membres hérités additionnels | |
Attributs protégés statiques hérités de DatabaseDriver | |
static | $connectors = [] |
static | $instances = [] |
static | $dbMinimum |
__construct | ( | array | $options | ) |
Constructor.
array | $options | List of options used to configure the connection |
Références DatabaseDriver\$options, Symfony\Contracts\Service\__construct(), et null.
Référencé par PdoDriver\__wakeup().
__destruct | ( | ) |
__sleep | ( | ) |
__wakeup | ( | ) |
connect | ( | ) |
Connects to the database if needed.
Implémente DatabaseInterface.
Références $format, $key, $this, $value, DatabaseDriver\dispatchEvent(), null, DatabaseEvents\POST_CONNECT, et PdoDriver\setOption().
Référencé par PdoDriver\execute(), PdoDriver\getOption(), PdoDriver\getVersion(), PdoDriver\insertid(), PdoDriver\select(), PdoDriver\setOption(), PdoDriver\transactionCommit(), PdoDriver\transactionRollback(), et PdoDriver\transactionStart().
connected | ( | ) |
Determines if the connection to the server is active.
Implémente DatabaseInterface.
Références DatabaseDriver\$limit, DatabaseDriver\$offset, DatabaseDriver\$sql, DatabaseDriver\$statement, PdoDriver\getConnectedQuery(), Joomla\Database\Query\limit(), DatabaseDriver\loadResult(), Joomla\Database\Query\offset(), et DatabaseDriver\setQuery().
Référencé par PdoDriver\execute().
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. |
Implémente DatabaseInterface.
Références $text.
Référencé par PgsqlDriver\renameTable().
execute | ( | ) |
Execute the SQL statement.
Implémente DatabaseInterface.
Références DatabaseDriver\$errorMsg, DatabaseDriver\$errorNum, $key, DatabaseDriver\$sql, PdoDriver\connect(), PdoDriver\connected(), null, et DatabaseDriver\replacePrefix().
Référencé par PgsqlDriver\transactionRollback(), MysqlDriver\transactionRollback(), PgsqlDriver\transactionStart(), MysqlDriver\transactionStart(), et PgsqlDriver\updateObject().
getConnectedQuery | ( | ) |
Get a query to run and verify the database is operational.
Référencé par PdoDriver\connected().
getOption | ( | $key | ) |
Retrieve a PDO database connection attribute https://www.php.net/manual/en/pdo.getattribute.php
Usage: $db->getOption(PDO::ATTR_CASE);
mixed | $key | One of the PDO::ATTR_* Constants |
Références $key, et PdoDriver\connect().
Référencé par SqliteDriver\getTableColumns(), SqliteDriver\getTableKeys(), MysqlDriver\getVersion(), et PdoDriver\getVersion().
getVersion | ( | ) |
Get the version of the database connector.
Implémente DatabaseInterface.
Références PdoDriver\connect(), et PdoDriver\getOption().
Référencé par PgsqlDriver\getConnectionEncryption().
insertid | ( | ) |
Method to get the auto-incremented value from the last INSERT statement.
Implémente DatabaseInterface.
Références PdoDriver\connect().
Référencé par MysqlDriver\insertObject().
|
static |
Test to see if the PDO extension is available. Override as needed to check for specific PDO Drivers.
Implémente DatabaseInterface.
|
protected |
Prepares a SQL statement for execution
string | $query | The SQL query to be prepared. |
PrepareStatementFailureException |
select | ( | $database | ) |
Select a database for use.
string | $database | The name of the database to select for use. |
Implémente DatabaseInterface.
Références PdoDriver\connect().
Référencé par PgsqlDriver\renameTable().
setOption | ( | $key, | |
$value | |||
) |
Sets an attribute on the PDO database handle. https://www.php.net/manual/en/pdo.setattribute.php
Usage: $db->setOption(PDO::ATTR_CASE, PDO::CASE_UPPER);
integer | $key | One of the PDO::ATTR_* Constants |
mixed | $value | One of the associated PDO Constants related to the particular attribute key. |
Références $key, $value, et PdoDriver\connect().
Référencé par PdoDriver\connect(), SqliteDriver\getTableColumns(), et SqliteDriver\getTableKeys().
setUtf | ( | ) |
Set the connection to use UTF-8 character encoding.
transactionCommit | ( | $toSavepoint = false | ) |
Method to commit a transaction.
boolean | $toSavepoint | If true, commit to the last savepoint. |
Implémente DatabaseInterface.
Références PdoDriver\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 PdoDriver\connect().
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 PdoDriver\connect().
|
protected |
$name = 'pdo' |
|
protected |
|
protected |