You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.7 KiB
59 lines
1.7 KiB
12 years ago
|
<?php
|
||
|
/**
|
||
|
* @link http://www.yiiframework.com/
|
||
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
||
|
* @license http://www.yiiframework.com/license/
|
||
|
*/
|
||
|
|
||
|
namespace yii\data;
|
||
|
|
||
|
/**
|
||
11 years ago
|
* DataProviderInterface is the interface that must be implemented by data provider classes.
|
||
12 years ago
|
*
|
||
11 years ago
|
* Data providers are components that sort and paginate data, and provide them to widgets
|
||
|
* such as [[GridView]], [[ListView]].
|
||
12 years ago
|
*
|
||
|
* @author Qiang Xue <qiang.xue@gmail.com>
|
||
|
* @since 2.0
|
||
|
*/
|
||
11 years ago
|
interface DataProviderInterface
|
||
12 years ago
|
{
|
||
|
/**
|
||
11 years ago
|
* Returns the number of data models in the current page.
|
||
|
* This is equivalent to `count($provider->getModels())`.
|
||
12 years ago
|
* When [[pagination]] is false, this is the same as [[totalCount]].
|
||
11 years ago
|
* @return integer the number of data models in the current page.
|
||
12 years ago
|
*/
|
||
12 years ago
|
public function getCount();
|
||
12 years ago
|
|
||
|
/**
|
||
11 years ago
|
* Returns the total number of data models.
|
||
12 years ago
|
* When [[pagination]] is false, this is the same as [[count]].
|
||
11 years ago
|
* @return integer total number of possible data models.
|
||
12 years ago
|
*/
|
||
12 years ago
|
public function getTotalCount();
|
||
12 years ago
|
|
||
|
/**
|
||
11 years ago
|
* Returns the data models in the current page.
|
||
|
* @return array the list of data models in the current page.
|
||
12 years ago
|
*/
|
||
11 years ago
|
public function getModels();
|
||
12 years ago
|
|
||
|
/**
|
||
11 years ago
|
* Returns the key values associated with the data models.
|
||
|
* @return array the list of key values corresponding to [[models]]. Each data model in [[models]]
|
||
12 years ago
|
* is uniquely identified by the corresponding key value in this array.
|
||
|
*/
|
||
|
public function getKeys();
|
||
|
|
||
|
/**
|
||
|
* @return Sort the sorting object. If this is false, it means the sorting is disabled.
|
||
|
*/
|
||
|
public function getSort();
|
||
|
|
||
|
/**
|
||
|
* @return Pagination the pagination object. If this is false, it means the pagination is disabled.
|
||
|
*/
|
||
|
public function getPagination();
|
||
|
}
|