Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de l'interface PreparableInterface
+ Graphe d'héritage de PreparableInterface:

Fonctions membres publiques

 bind ($key, &$value, $dataType=ParameterType::STRING, $length=0, $driverOptions=[])
 
 unbind ($key)
 
getBounded ($key=null)
 

Description détaillée

Joomla Database Query Preparable Interface.

Adds bind/unbind methods as well as a getBounded() method to retrieve the stored bounded variables on demand prior to query execution.

Depuis
1.0
Obsolète:
3.0 Capabilities will be required in Joomla

Documentation des fonctions membres

◆ bind()

bind (   $key,
$value,
  $dataType = ParameterType::STRING,
  $length = 0,
  $driverOptions = [] 
)

Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution.

Paramètres
array | string | integer$keyThe key that will be used in your SQL query to reference the value. Usually of the form ':key', but can also be an integer.
mixed$valueThe value that will be bound. It can be an array, in this case it has to be same length of $key; The value is passed by reference to support output parameters such as those possible with stored procedures.
array | string$dataTypeConstant corresponding to a SQL datatype. It can be an array, in this case it has to be same length of $key
integer$lengthThe length of the variable. Usually required for OUTPUT parameters.
array$driverOptionsOptional driver options to be used.
Renvoie
$this
Depuis
1.0

Implémenté dans DatabaseQuery.

◆ getBounded()

& getBounded (   $key = null)

Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is returned.

Paramètres
mixed$keyThe bounded variable key to retrieve.
Renvoie
mixed
Depuis
1.0

Implémenté dans DatabaseQuery.

◆ unbind()

unbind (   $key)

Method to unbind a bound variable.

Paramètres
array | string | integer$keyThe key or array of keys to unbind.
Renvoie
$this
Depuis
2.0.0

Implémenté dans DatabaseQuery.


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