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