Source for file preparable.php

Documentation is available at preparable.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Database
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * Joomla Database Query Preparable Interface.
  14.  * Adds bind/unbind methods as well as a getBounded() method
  15.  * to retrieve the stored bounded variables on demand prior to
  16.  * query execution.
  17.  *
  18.  * @package     Joomla.Platform
  19.  * @subpackage  Database
  20.  * @since       12.1
  21.  */
  22. {
  23.     /**
  24.      * Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution. Also
  25.      * removes a variable that has been bounded from the internal bounded array when the passed in value is null.
  26.      *
  27.      * @param   string|integer $key            The key that will be used in your SQL query to reference the value. Usually of
  28.      *                                           the form ':key', but can also be an integer.
  29.      * @param   mixed           &$value         The value that will be bound. The value is passed by reference to support output
  30.      *                                           parameters such as those possible with stored procedures.
  31.      * @param   integer         $dataType       Constant corresponding to a SQL datatype.
  32.      * @param   integer         $length         The length of the variable. Usually required for OUTPUT parameters.
  33.      * @param   array           $driverOptions  Optional driver options to be used.
  34.      *
  35.      * @return  JDatabaseQuery 
  36.      *
  37.      * @since   12.1
  38.      */
  39.     public function bind($key null&$value null$dataType PDO::PARAM_STR$length 0$driverOptions array());
  40.  
  41.     /**
  42.      * Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is
  43.      * returned.
  44.      *
  45.      * @param   mixed  $key  The bounded variable key to retrieve.
  46.      *
  47.      * @return  mixed 
  48.      *
  49.      * @since   12.1
  50.      */
  51.     public function &getBounded($key null);
  52. }

Documentation generated on Tue, 19 Nov 2013 15:11:12 +0100 by phpDocumentor 1.4.3