PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/libraries/joomla/database/query/limitable.php

https://gitlab.com/vitaliylukin91/text
PHP | 54 lines | 7 code | 3 blank | 44 comment | 0 complexity | 8c449d613d4193d5788ff9295ea2e5a5 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 Limitable 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 JDatabaseQueryLimitable
21{
22	/**
23	 * Method to modify a query already in string format with the needed
24	 * additions to make the query limited to a particular number of
25	 * results, or start at a particular offset. This method is used
26	 * automatically by the __toString() method if it detects that the
27	 * query implements the JDatabaseQueryLimitable interface.
28	 *
29	 * @param   string   $query   The query in string format
30	 * @param   integer  $limit   The limit for the result set
31	 * @param   integer  $offset  The offset for the result set
32	 *
33	 * @return  string
34	 *
35	 * @since   12.1
36	 */
37	public function processLimit($query, $limit, $offset = 0);
38
39	/**
40	 * Sets the offset and limit for the result set, if the database driver supports it.
41	 *
42	 * Usage:
43	 * $query->setLimit(100, 0); (retrieve 100 rows, starting at first record)
44	 * $query->setLimit(50, 50); (retrieve 50 rows, starting at 50th record)
45	 *
46	 * @param   integer  $limit   The limit for the result set
47	 * @param   integer  $offset  The offset for the result set
48	 *
49	 * @return  JDatabaseQuery  Returns this object to allow chaining.
50	 *
51	 * @since   12.1
52	 */
53	public function setLimit($limit = 0, $offset = 0);
54}