Source for file limitable.php

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

Documentation generated on Tue, 19 Nov 2013 15:07:05 +0100 by phpDocumentor 1.4.3