本文整理汇总了PHP中PermissionPeer::doCount方法的典型用法代码示例。如果您正苦于以下问题:PHP PermissionPeer::doCount方法的具体用法?PHP PermissionPeer::doCount怎么用?PHP PermissionPeer::doCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PermissionPeer
的用法示例。
在下文中一共展示了PermissionPeer::doCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getListResponse
public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
{
$permissionFilter = $this->toObject();
$c = new Criteria();
$permissionFilter->attachToCriteria($c);
$count = PermissionPeer::doCount($c);
$pager->attachToCriteria($c);
$list = PermissionPeer::doSelect($c);
$response = new KalturaPermissionListResponse();
$response->objects = KalturaPermissionArray::fromDbArray($list, $responseProfile);
$response->totalCount = $count;
return $response;
}
示例2: listAction
/**
* Lists permission objects that are associated with an account.
* Blocked permissions are listed unless you use a filter to exclude them.
* Blocked permissions are listed unless you use a filter to exclude them.
*
* @action list
* @param KalturaPermissionFilter $filter A filter used to exclude specific types of permissions
* @param KalturaFilterPager $pager A limit for the number of records to display on a page
* @return KalturaPermissionListResponse The list of permission objects
*/
public function listAction(KalturaPermissionFilter $filter = null, KalturaFilterPager $pager = null)
{
if (!$filter) {
$filter = new KalturaPermissionFilter();
}
$permissionFilter = $filter->toObject();
$c = new Criteria();
$permissionFilter->attachToCriteria($c);
$count = PermissionPeer::doCount($c);
if (!$pager) {
$pager = new KalturaFilterPager();
}
$pager->attachToCriteria($c);
$list = PermissionPeer::doSelect($c);
$response = new KalturaPermissionListResponse();
$response->objects = KalturaPermissionArray::fromDbArray($list);
$response->totalCount = $count;
return $response;
}
示例3: countPermissions
/**
* Returns the number of related Permissions.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param Connection $con
* @throws PropelException
*/
public function countPermissions($criteria = null, $distinct = false, $con = null)
{
// include the Peer class
include_once 'src/model/whiteboard/om/BasePermissionPeer.php';
if ($criteria === null) {
$criteria = new Criteria();
} elseif ($criteria instanceof Criteria) {
$criteria = clone $criteria;
}
$criteria->add(PermissionPeer::ROOM_ID, $this->getRoomId());
return PermissionPeer::doCount($criteria, $distinct, $con);
}