Blame view

framework/model/Limitable.php 731 Bytes
0084d336   Administrator   Importers CRUD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <?php
  
  /**
   * Additional interface for {@link SS_List} classes that are limitable - able to have a subset of the list extracted.
   *
   * All methods in this interface are immutable - they should return new instances with the limit
   * applied, rather than applying the limit in place
   *
   * @see SS_List, SS_Sortable, SS_Filterable
   * @package framework
   * @subpackage model
   */
  interface SS_Limitable {
  
  	/**
  	 * Returns a new instance of this list where no more than $limit records are included.
  	 * If $offset is specified, then that many records at the beginning of the list will be skipped.
  	 * This matches the behaviour of the SQL LIMIT clause.
  	 * 
  	 * @return SS_Limitable
  	 */
  	public function limit($limit, $offset = 0);
  
  }