2012-03-09 02:02:37 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Additional interface for {@link SS_List} classes that are limitable - able to have a subset of the list extracted.
|
2012-07-20 04:51:12 +02:00
|
|
|
*
|
|
|
|
* All methods in this interface are immutable - they should return new instances with the limit
|
|
|
|
* applied, rather than applying the limit in place
|
|
|
|
*
|
2012-03-09 02:02:37 +01:00
|
|
|
* @see SS_List, SS_Sortable, SS_Filterable
|
2013-11-29 05:12:47 +01:00
|
|
|
* @package framework
|
|
|
|
* @subpackage model
|
2012-03-09 02:02:37 +01:00
|
|
|
*/
|
2014-07-30 01:07:01 +02:00
|
|
|
interface SS_Limitable extends SS_List {
|
2012-03-09 02:02:37 +01:00
|
|
|
|
|
|
|
/**
|
2012-12-12 05:22:45 +01:00
|
|
|
* Returns a new instance of this list where no more than $limit records are included.
|
2012-03-09 02:02:37 +01:00
|
|
|
* 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.
|
2014-07-30 01:07:01 +02:00
|
|
|
*
|
2012-12-12 05:22:45 +01:00
|
|
|
* @return SS_Limitable
|
2012-03-09 02:02:37 +01:00
|
|
|
*/
|
|
|
|
public function limit($limit, $offset = 0);
|
|
|
|
|
2012-03-24 04:04:52 +01:00
|
|
|
}
|