PageRenderTime 15ms CodeModel.GetById 7ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/libraries/joomla/database/query/preparable.php

https://gitlab.com/vitaliylukin91/lavka
PHP | 51 lines | 7 code | 3 blank | 41 comment | 0 complexity | d7eed30c92bbdd8ab6d2487bb3030578 MD5 | raw file
 1<?php
 2/**
 3 * @package     Joomla.Platform
 4 * @subpackage  Database
 5 *
 6 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 7 * @license     GNU General Public License version 2 or later; see LICENSE
 8 */
 9
10defined('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 * @since  12.1
19 */
20interface JDatabaseQueryPreparable
21{
22	/**
23	 * Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution. Also
24	 * removes a variable that has been bounded from the internal bounded array when the passed in value is null.
25	 *
26	 * @param   string|integer  $key            The key that will be used in your SQL query to reference the value. Usually of
27	 *                                          the form ':key', but can also be an integer.
28	 * @param   mixed           &$value         The value that will be bound. The value is passed by reference to support output
29	 *                                          parameters such as those possible with stored procedures.
30	 * @param   integer         $dataType       Constant corresponding to a SQL datatype.
31	 * @param   integer         $length         The length of the variable. Usually required for OUTPUT parameters.
32	 * @param   array           $driverOptions  Optional driver options to be used.
33	 *
34	 * @return  JDatabaseQuery
35	 *
36	 * @since   12.1
37	 */
38	public function bind($key = null, &$value = null, $dataType = PDO::PARAM_STR, $length = 0, $driverOptions = array());
39
40	/**
41	 * Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is
42	 * returned.
43	 *
44	 * @param   mixed  $key  The bounded variable key to retrieve.
45	 *
46	 * @return  mixed
47	 *
48	 * @since   12.1
49	 */
50	public function &getBounded($key = null);
51}