Merge pull request #3344 from tractorcow/pulls/3.2/sslist

API SS_Filterable, SS_Limitable and SS_Sortable now explicitly extend SS_List
This commit is contained in:
Sean Harvey 2014-07-30 15:38:07 +12:00
commit bab4a24f4b
4 changed files with 8 additions and 7 deletions

View File

@ -11,6 +11,7 @@
* HtmlEditorField no longer substitutes `<blockquote />` for indented text * HtmlEditorField no longer substitutes `<blockquote />` for indented text
* ClassInfo::dataClassesFor now returns classes which should have tables, regardless of whether those * ClassInfo::dataClassesFor now returns classes which should have tables, regardless of whether those
tables actually exist. tables actually exist.
* SS_Filterable, SS_Limitable and SS_Sortable now explicitly extend SS_List
### CMS ### CMS

View File

@ -10,7 +10,7 @@
* @package framework * @package framework
* @subpackage model * @subpackage model
*/ */
interface SS_Filterable { interface SS_Filterable extends SS_List {
/** /**
* Returns TRUE if the list can be filtered by a given field expression. * Returns TRUE if the list can be filtered by a given field expression.
@ -19,7 +19,7 @@ interface SS_Filterable {
* @return bool * @return bool
*/ */
public function canFilterBy($by); public function canFilterBy($by);
/** /**
* Return a new instance of this list that only includes items with these charactaristics * Return a new instance of this list that only includes items with these charactaristics
* *

View File

@ -10,13 +10,13 @@
* @package framework * @package framework
* @subpackage model * @subpackage model
*/ */
interface SS_Limitable { interface SS_Limitable extends SS_List {
/** /**
* Returns a new instance of this list where no more than $limit records are included. * 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. * 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. * This matches the behaviour of the SQL LIMIT clause.
* *
* @return SS_Limitable * @return SS_Limitable
*/ */
public function limit($limit, $offset = 0); public function limit($limit, $offset = 0);

View File

@ -10,7 +10,7 @@
* @package framework * @package framework
* @subpackage model * @subpackage model
*/ */
interface SS_Sortable { interface SS_Sortable extends SS_List {
/** /**
* Returns TRUE if the list can be sorted by a field. * Returns TRUE if the list can be sorted by a field.
@ -31,8 +31,8 @@ interface SS_Sortable {
* @example $list = $list->sort(array('Name'=>'ASC,'Age'=>'DESC')); * @example $list = $list->sort(array('Name'=>'ASC,'Age'=>'DESC'));
*/ */
public function sort(); public function sort();
/** /**
* Return a new instance of this list based on reversing the current sort. * Return a new instance of this list based on reversing the current sort.
* *