mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-30 06:26:11 +02:00
API CHANGE: Deprecated SS_List::getRange() in favour of SS_Limitable::limit(). API CHANGE: Introduce SS_Limitable::limit($limit, $offset = 0) as the only modern way of specifying limits; deprecate all others.
19 lines
530 B
PHP
19 lines
530 B
PHP
<?php
|
|
|
|
/**
|
|
* Additional interface for {@link SS_List} classes that are limitable - able to have a subset of the list extracted.
|
|
*
|
|
* @see SS_List, SS_Sortable, SS_Filterable
|
|
*/
|
|
interface SS_Limitable {
|
|
|
|
/**
|
|
* Returns a filtered version of this 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_List
|
|
*/
|
|
public function limit($limit, $offset = 0);
|
|
|
|
} |