本文整理匯總了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;
}