本文整理匯總了PHP中XoopsPersistableObjectHandler::getCount方法的典型用法代碼示例。如果您正苦於以下問題:PHP XoopsPersistableObjectHandler::getCount方法的具體用法?PHP XoopsPersistableObjectHandler::getCount怎麽用?PHP XoopsPersistableObjectHandler::getCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XoopsPersistableObjectHandler
的用法示例。
在下文中一共展示了XoopsPersistableObjectHandler::getCount方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: countRelated
public function countRelated($start = 0, $limit = 0, $sort = 'related_name', $order = 'ASC')
{
$criteria = new CriteriaCompo();
$criteria->setSort($sort);
$criteria->setOrder($order);
$criteria->setStart($start);
$criteria->setLimit($limit);
return parent::getCount();
}
示例2: hasVoted
public function hasVoted($content_id)
{
$helper = Page::getInstance();
$uid = $helper->getUserId();
$ip = $helper->xoops()->getenv('REMOTE_ADDR');
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('rating_content_id', $content_id));
$criteria2 = new CriteriaCompo();
$criteria2->add(new Criteria('rating_uid', $uid), 'OR');
$criteria2->add(new Criteria('rating_ip', $ip), 'OR');
$criteria->add($criteria2, 'AND');
return parent::getCount($criteria);
}
示例3: countPage
public function countPage($start = 0, $limit = 0, $sort = 'content_weight ASC, content_title', $order = 'ASC')
{
$criteria = new CriteriaCompo();
$criteria->setSort($sort);
$criteria->setOrder($order);
$criteria->setStart($start);
$criteria->setLimit($limit);
return parent::getCount($criteria);
}
示例4: getPostCount
function getPostCount($criteria = null)
{
return parent::getCount($criteria);
}