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é
Référence de la classe FOFDatabaseDriverPdo
+ Graphe d'héritage de FOFDatabaseDriverPdo:

Fonctions membres publiques

 __construct ($options)
 
 __destruct ()
 
 connect ()
 
 disconnect ()
 
 escape ($text, $extra=false)
 
 execute ()
 
 getOption ($key)
 
 getConnectedQuery ()
 
 setOption ($key, $value)
 
 connected ()
 
 getAffectedRows ()
 
 getNumRows ($cursor=null)
 
 insertid ()
 
 select ($database)
 
 setQuery ($query, $offset=null, $limit=null, $driverOptions=array())
 
 setUtf ()
 
 transactionCommit ($toSavepoint=false)
 
 transactionRollback ($toSavepoint=false)
 
 transactionStart ($asSavepoint=false)
 
 loadNextObject ($class='stdClass')
 
 loadNextAssoc ()
 
 loadNextRow ()
 
 __sleep ()
 
 __wakeup ()
 
- Fonctions membres publiques hérités de FOFDatabaseDriver
 __call ($method, $args)
 
 __construct ($options)
 
 alterDbCharacterSet ($dbName)
 
 alterTableCharacterSet ($tableName, $rethrow=false)
 
 connect ()
 
 connected ()
 
 createDatabase ($options, $utf=true)
 
 disconnect ()
 
 addDisconnectHandler ($callable)
 
 dropTable ($table, $ifExists=true)
 
 escape ($text, $extra=false)
 
 getAffectedRows ()
 
 getAlterDbCharacterSet ($dbName)
 
 getAlterTableCharacterSet ($tableName)
 
 convertUtf8mb4QueryToUtf8 ($query)
 
 getCollation ()
 
 getConnectionCollation ()
 
 getConnection ()
 
 getCount ()
 
 getDateFormat ()
 
 getLog ()
 
 getTimings ()
 
 getCallStacks ()
 
 getMinimum ()
 
 getNullDate ()
 
 getNumRows ($cursor=null)
 
 getPrefix ()
 
 getExporter ()
 
 getImporter ()
 
 getName ()
 
 getServerType ()
 
 getQuery ($new=false)
 
 getIterator ($column=null, $class='stdClass')
 
 getTableColumns ($table, $typeOnly=true)
 
 getTableCreate ($tables)
 
 getTableKeys ($tables)
 
 getTableList ()
 
 getUTFSupport ()
 
 hasUTFSupport ()
 
 hasUTF8mb4Support ()
 
 getVersion ()
 
 insertid ()
 
 insertObject ($table, &$object, $key=null)
 
 isMinimumVersion ()
 
 loadAssoc ()
 
 loadAssocList ($key=null, $column=null)
 
 loadColumn ($offset=0)
 
 loadNextObject ($class='stdClass')
 
 loadNextRow ()
 
 loadObject ($class='stdClass')
 
 loadObjectList ($key='', $class='stdClass')
 
 loadResult ()
 
 loadRow ()
 
 loadRowList ($key=null)
 
 lockTable ($tableName)
 
 quote ($text, $escape=true)
 
 quoteName ($name, $as=null)
 
 replacePrefix ($sql, $prefix='#__')
 
 renameTable ($oldTable, $newTable, $backup=null, $prefix=null)
 
 select ($database)
 
 setDebug ($level)
 
 setQuery ($query, $offset=0, $limit=0)
 
 setUtf ()
 
 transactionCommit ($toSavepoint=false)
 
 transactionRollback ($toSavepoint=false)
 
 transactionStart ($asSavepoint=false)
 
 truncateTable ($table)
 
 updateObject ($table, &$object, $key, $nulls=false)
 
 execute ()
 
 unlockTables ()
 
- Fonctions membres publiques hérités de FOFDatabase
 query ()
 
 getErrorMsg ($escaped=false)
 
 getErrorNum ()
 
 stderr ($showSQL=false)
 

Fonctions membres publiques statiques

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 = 'pdo'
 
- Champs de données hérités de FOFDatabaseDriver
 $name
 
 $serverType
 

Fonctions membres protégées

 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)
 

Attributs protégés

 $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()
 

Membres hérités additionnels

- Attributs protégés statiques hérités de FOFDatabaseDriver
static $instances = array()
 
static $dbMinimum
 

Description détaillée

Joomla Platform PDO Database Driver Class

Voir également
http://php.net/pdo
Depuis
12.1

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $options)

Constructor.

Paramètres
array$optionsList of options used to configure the connection
Depuis
12.1

Références $options.

◆ __destruct()

__destruct ( )

Destructor.

Depuis
12.1

Documentation des fonctions membres

◆ __sleep()

__sleep ( )

PDO does not support serialize

Renvoie
array
Depuis
12.3

◆ __wakeup()

__wakeup ( )

Wake up after serialization

Renvoie
array
Depuis
12.3

◆ connect()

connect ( )

Connects to the database if needed.

Renvoie
void Returns void if the database connected successfully.
Depuis
12.1
Exceptions
RuntimeException

Références $format.

◆ connected()

connected ( )

Determines if the connection to the server is active.

Renvoie
boolean True if connected to the database engine.
Depuis
12.1

Références $limit, $offset, et $query.

◆ disconnect()

disconnect ( )

Disconnects the database.

Renvoie
void
Depuis
12.1

◆ escape()

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.

Paramètres
string$textThe string to be escaped.
boolean$extraUnused optional parameter to provide extra escaping.
Renvoie
string The escaped string.
Depuis
12.1

Références $text.

◆ execute()

execute ( )

Execute the SQL statement.

Renvoie
mixed A database cursor resource on success, boolean false on failure.
Depuis
12.1
Exceptions
RuntimeException
Exception

Références $key, $limit, $query, et null.

◆ fetchArray()

fetchArray (   $cursor = null)
protected

Method to fetch a row from the result set cursor as an array.

Paramètres
mixed$cursorThe optional result set cursor from which to fetch the row.
Renvoie
mixed Either the next row from the result set or false if there are no more rows.
Depuis
12.1

◆ fetchAssoc()

fetchAssoc (   $cursor = null)
protected

Method to fetch a row from the result set cursor as an associative array.

Paramètres
mixed$cursorThe optional result set cursor from which to fetch the row.
Renvoie
mixed Either the next row from the result set or false if there are no more rows.
Depuis
12.1

◆ fetchObject()

fetchObject (   $cursor = null,
  $class = 'stdClass' 
)
protected

Method to fetch a row from the result set cursor as an object.

Paramètres
mixed$cursorThe optional result set cursor from which to fetch the row.
string$classUnused, only necessary so method signature will be the same as parent.
Renvoie
mixed Either the next row from the result set or false if there are no more rows.
Depuis
12.1

Références $class.

◆ freeResult()

freeResult (   $cursor = null)
protected

Method to free up the memory used for the result set.

Paramètres
mixed$cursorThe optional result set cursor from which to fetch the row.
Renvoie
void
Depuis
12.1

Références null.

◆ getAffectedRows()

getAffectedRows ( )

Get the number of affected rows for the previous executed SQL statement. Only applicable for DELETE, INSERT, or UPDATE statements.

Renvoie
integer The number of affected rows.
Depuis
12.1

◆ getConnectedQuery()

getConnectedQuery ( )

Get a query to run and verify the database is operational.

Renvoie
string The query to check the health of the DB.
Depuis
12.2

◆ getErrorMessage()

getErrorMessage (   $query)
protected

Return the actual SQL Error message

Paramètres
string$queryThe SQL Query that fails
Renvoie
string The SQL Error message
Depuis
3.4.6

◆ getErrorNumber()

getErrorNumber ( )
protected

Return the actual SQL Error number

Renvoie
integer The SQL Error number
Depuis
3.4.6

◆ getNumRows()

getNumRows (   $cursor = null)

Get the number of returned rows for the previous executed SQL statement. Only applicable for DELETE, INSERT, or UPDATE statements.

Paramètres
resource$cursorAn optional database cursor resource to extract the row count from.
Renvoie
integer The number of returned rows.
Depuis
12.1

Références elseif.

◆ getOption()

getOption (   $key)

Retrieve a PDO database connection attribute http://www.php.net/manual/en/pdo.getattribute.php

Usage: $db->getOption(PDO::ATTR_CASE);

Paramètres
mixed$keyOne of the PDO::ATTR_* Constants
Renvoie
mixed
Depuis
12.1

Références $key.

◆ insertid()

insertid ( )

Method to get the auto-incremented value from the last INSERT statement.

Renvoie
string The value of the auto-increment field from the last inserted row.
Depuis
12.1

◆ isSupported()

static isSupported ( )
static

Test to see if the PDO extension is available. Override as needed to check for specific PDO Drivers.

Renvoie
boolean True on success, false otherwise.
Depuis
12.1

Implémente JDatabaseInterface.

◆ loadNextAssoc()

loadNextAssoc ( )

Method to get the next row in the result set from the database query as an array.

Renvoie
mixed The result of the query as an array, false if there are no more rows.
Depuis
12.1
Exceptions
RuntimeException

Références $row, et null.

◆ loadNextObject()

loadNextObject (   $class = 'stdClass')

Method to get the next row in the result set from the database query as an object.

Paramètres
string$classThe class name to use for the returned row object.
Renvoie
mixed The result of the query as an array, false if there are no more rows.
Depuis
12.1
Exceptions
RuntimeException
Obsolète:
4.0 (CMS) Use getIterator() instead

Références $class, $row, et null.

◆ loadNextRow()

loadNextRow ( )

Method to get the next row in the result set from the database query as an array.

Renvoie
mixed The result of the query as an array, false if there are no more rows.
Depuis
12.1
Exceptions
RuntimeException
Obsolète:
4.0 (CMS) Use getIterator() instead

Références $row, et null.

◆ select()

select (   $database)

Select a database for use.

Paramètres
string$databaseThe name of the database to select for use.
Renvoie
boolean True if the database was successfully selected.
Depuis
12.1
Exceptions
RuntimeException

◆ setOption()

setOption (   $key,
  $value 
)

Sets an attribute on the PDO database handle. http://www.php.net/manual/en/pdo.setattribute.php

Usage: $db->setOption(PDO::ATTR_CASE, PDO::CASE_UPPER);

Paramètres
integer$keyOne of the PDO::ATTR_* Constants
mixed$valueOne of the associated PDO Constants related to the particular attribute key.
Renvoie
boolean
Depuis
12.1

Références $key, et $value.

◆ setQuery()

setQuery (   $query,
  $offset = null,
  $limit = null,
  $driverOptions = array() 
)

Sets the SQL statement string for later execution.

Paramètres
mixed$queryThe SQL statement to set either as a FOFDatabaseQuery object or a string.
integer$offsetThe affected row offset to set.
integer$limitThe maximum affected rows to set.
array$driverOptionsThe optional PDO driver options.
Renvoie
FOFDatabaseDriver This object to support method chaining.
Depuis
12.1

Références $limit, $offset, et $query.

◆ setUtf()

setUtf ( )

Set the connection to use UTF-8 character encoding.

Renvoie
boolean True on success.
Depuis
12.1

◆ transactionCommit()

transactionCommit (   $toSavepoint = false)

Method to commit a transaction.

Paramètres
boolean$toSavepointIf true, commit to the last savepoint.
Renvoie
void
Depuis
12.1
Exceptions
RuntimeException

◆ transactionRollback()

transactionRollback (   $toSavepoint = false)

Method to roll back a transaction.

Paramètres
boolean$toSavepointIf true, rollback to the last savepoint.
Renvoie
void
Depuis
12.1
Exceptions
RuntimeException

◆ transactionStart()

transactionStart (   $asSavepoint = false)

Method to initialize a transaction.

Paramètres
boolean$asSavepointIf true and a transaction is already active, a savepoint will be created.
Renvoie
void
Depuis
12.1
Exceptions
RuntimeException

Documentation des champs

◆ $connection

$connection
protected

◆ $executed

$executed = false
protected

◆ $name

$name = 'pdo'

◆ $nameQuote

$nameQuote = "'"
protected

◆ $nullDate

$nullDate = '0000-00-00 00:00:00'
protected

◆ $prepared

$prepared
protected

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