本文整理汇总了PHP中JModel::_getList方法的典型用法代码示例。如果您正苦于以下问题:PHP JModel::_getList方法的具体用法?PHP JModel::_getList怎么用?PHP JModel::_getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModel
的用法示例。
在下文中一共展示了JModel::_getList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
function &_getList($query, $limitstart = 0, $limit = 0)
{
$result =& parent::_getList($query, $limitstart, $limit);
$odd = 1;
foreach ($result as $k => $row) {
$result[$k]->odd = $odd;
$odd = 1 - $odd;
}
return $result;
}
示例2: _getList
function _getList($query, $start, $limit)
{
/* Note by Bill: Not sure why the base doesn't handle the pagination
arguments, but this gets around the issue for now. Check again after
1.5.
*/
$full_list = JModel::_getList($query);
usort($full_list, array("ArtclubsModelArtclubs", "sort_by_exhib"));
$mode = JRequest::getCmd('layout', 'default');
if ($mode != 'default') {
return $full_list;
}
if ($full_list) {
return array_slice($full_list, $start, $limit);
}
return array();
}
示例3:
/**
* Returns an object list
* Overriden to check on respective values
* of limit and limit start
* If limit is 0, limitstart should be reset to 0 as well
*
* @param string The query
* @param int Offset
* @param int The number of records
* @return array
* @access protected
* @since 1.5
*/
function &_getList($query, $limitstart = 0, $limit = 0)
{
// check limit and lim
$limitstart = $limit === 0 ? 0 : $limitstart;
// do the job
$result = parent::_getList($query, $limitstart, $limit);
return $result;
}
示例4:
/**
* Returns an object list
*
* @param string The query
* @param int Offset
* @param int The number of records
* @return array
*/
public function &_getList($query, $limitstart = 0, $limit = 0)
{
$query = (string) $query;
$result = parent::_getList($query, $limitstart, $limit);
return $result;
}