本文整理汇总了PHP中CActiveDataProvider::fetchData方法的典型用法代码示例。如果您正苦于以下问题:PHP CActiveDataProvider::fetchData方法的具体用法?PHP CActiveDataProvider::fetchData怎么用?PHP CActiveDataProvider::fetchData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CActiveDataProvider
的用法示例。
在下文中一共展示了CActiveDataProvider::fetchData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchData
protected function fetchData()
{
if (!is_null($this->_cache_duration)) {
$this->model = $this->model->cache($this->_cache_duration, $this->_cache_dependency, 2);
}
return parent::fetchData();
}
示例2: fetchData
/**
* Fetches the data from the persistent data storage.
* @return array list of data items
*/
protected function fetchData()
{
$data = parent::fetchData();
foreach ($data as $model) {
$this->_authorizer->attachUserBehavior($model);
}
return $data;
}
示例3: fetchData
/**
* Fetches the data from the persistent data storage.
* @return array list of data items
*/
public function fetchData()
{
$data = parent::fetchData();
if ($this->_behaviors !== array()) {
foreach ($data as $model) {
$model->attachBehaviors($this->_behaviors);
}
}
return $data;
}
示例4: fetchData
/**
* Fetches the data from the persistent data storage.
*
* @return array list of data items
*/
protected function fetchData()
{
$sourceCriteria = clone $this->getCriteria();
$criteria = $this->getCriteria();
if (($alphapagination = $this->getAlphaPagination()) !== false) {
$alphapagination->applyCondition($criteria);
}
$result = parent::fetchData();
$this->setCriteria($sourceCriteria);
return $result;
}
示例5: fetchData
/**
* Fetches the data from the persistent data storage.
* Additionally, calls KeenActiveDataProvider::afterFetch method
* @return array list of data items
*/
protected function fetchData()
{
if ($this->_withKeenLoading) {
$this->_prepareKeenLoading();
}
$data = parent::fetchData();
if ($data && $this->_withKeenLoading) {
$data = $this->afterFetch($data);
}
return $data;
}