[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Part of the Joomla Framework Database Package 4 * 5 * @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved. 6 * @license GNU General Public License version 2 or later; see LICENSE 7 */ 8 9 namespace Joomla\Database\Query; 10 11 use Joomla\Database\ParameterType; 12 use Joomla\Database\QueryInterface; 13 14 trigger_deprecation( 15 'joomla/database', 16 '2.0.0', 17 '%s() is deprecated and will be removed in 3.0, all query objects should implement %s instead.', 18 PreparableInterface::class, 19 QueryInterface::class 20 ); 21 22 /** 23 * Joomla Database Query Preparable Interface. 24 * 25 * Adds bind/unbind methods as well as a getBounded() method to retrieve the stored bounded variables on demand prior to query execution. 26 * 27 * @since 1.0 28 * @deprecated 3.0 Capabilities will be required in Joomla\Database\QueryInterface 29 */ 30 interface PreparableInterface 31 { 32 /** 33 * Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution. 34 * 35 * @param array|string|integer $key The key that will be used in your SQL query to reference the value. Usually of 36 * the form ':key', but can also be an integer. 37 * @param mixed $value The value that will be bound. It can be an array, in this case it has to be 38 * same length of $key; The value is passed by reference to support output 39 * parameters such as those possible with stored procedures. 40 * @param array|string $dataType Constant corresponding to a SQL datatype. It can be an array, in this case it 41 * has to be same length of $key 42 * @param integer $length The length of the variable. Usually required for OUTPUT parameters. 43 * @param array $driverOptions Optional driver options to be used. 44 * 45 * @return $this 46 * 47 * @since 1.0 48 */ 49 public function bind($key, &$value, $dataType = ParameterType::STRING, $length = 0, $driverOptions = []); 50 51 /** 52 * Method to unbind a bound variable. 53 * 54 * @param array|string|integer $key The key or array of keys to unbind. 55 * 56 * @return $this 57 * 58 * @since 2.0.0 59 */ 60 public function unbind($key); 61 62 /** 63 * Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is returned. 64 * 65 * @param mixed $key The bounded variable key to retrieve. 66 * 67 * @return mixed 68 * 69 * @since 1.0 70 */ 71 public function &getBounded($key = null); 72 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |