本文整理汇总了PHP中assetParamsPeer::doCount方法的典型用法代码示例。如果您正苦于以下问题:PHP assetParamsPeer::doCount方法的具体用法?PHP assetParamsPeer::doCount怎么用?PHP assetParamsPeer::doCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类assetParamsPeer
的用法示例。
在下文中一共展示了assetParamsPeer::doCount方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doGetListResponse
protected function doGetListResponse(KalturaFilterPager $pager, array $types = null)
{
$flavorParamsFilter = $this->toObject();
$c = new Criteria();
$flavorParamsFilter->attachToCriteria($c);
$pager->attachToCriteria($c);
if ($types) {
$c->add(assetParamsPeer::TYPE, $types, Criteria::IN);
}
$list = assetParamsPeer::doSelect($c);
$c->setLimit(null);
$totalCount = assetParamsPeer::doCount($c);
return array($list, $totalCount);
}
示例2: listAction
/**
* List Thumb Params by filter with paging support (By default - all system default params will be listed too)
*
* @action list
* @param KalturaThumbParamsFilter $filter
* @param KalturaFilterPager $pager
* @return KalturaThumbParamsListResponse
*/
public function listAction(KalturaThumbParamsFilter $filter = null, KalturaFilterPager $pager = null)
{
if (!$filter) {
$filter = new KalturaThumbParamsFilter();
}
if (!$pager) {
$pager = new KalturaFilterPager();
}
$thumbParamsFilter = new assetParamsFilter();
$filter->toObject($thumbParamsFilter);
$c = new Criteria();
$thumbParamsFilter->attachToCriteria($c);
$pager->attachToCriteria($c);
$thumbTypes = KalturaPluginManager::getExtendedTypes(assetParamsPeer::OM_CLASS, assetType::THUMBNAIL);
$c->add(assetParamsPeer::TYPE, $thumbTypes, Criteria::IN);
$dbList = assetParamsPeer::doSelect($c);
$c->setLimit(null);
$totalCount = assetParamsPeer::doCount($c);
$list = KalturaThumbParamsArray::fromDbArray($dbList);
$response = new KalturaThumbParamsListResponse();
$response->objects = $list;
$response->totalCount = $totalCount;
return $response;
}
示例3: doCount
public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
{
self::getInstance();
return parent::doCount($criteria, $distinct, $con);
}
示例4: validateTemplatePartner
/**
* Validate the amount of core and plugin objects found on the template partner.
* @param Partner $templatePartner
*/
private function validateTemplatePartner(Partner $templatePartner)
{
//access control profiles
$c = new Criteria();
$c->add(accessControlPeer::PARTNER_ID, $templatePartner->getId());
$count = accessControlPeer::doCount($c);
if ($count > kConf::get('copy_partner_limit_ac_profiles')) {
throw new kCoreException("Template partner's number of [accessControlProfiles] objects exceed allowed limit", kCoreException::TEMPLATE_PARTNER_COPY_LIMIT_EXCEEDED);
}
//categories
categoryPeer::setUseCriteriaFilter(false);
$c = new Criteria();
$c->addAnd(categoryPeer::PARTNER_ID, $templatePartner->getId());
$c->addAnd(categoryPeer::STATUS, CategoryStatus::ACTIVE);
$count = categoryPeer::doCount($c);
if ($count > kConf::get('copy_partner_limit_categories')) {
throw new kCoreException("Template partner's number of [category] objects exceed allowed limit", kCoreException::TEMPLATE_PARTNER_COPY_LIMIT_EXCEEDED);
}
categoryPeer::setUseCriteriaFilter(true);
//conversion profiles
$c = new Criteria();
$c->add(conversionProfile2Peer::PARTNER_ID, $templatePartner->getId());
$count = conversionProfile2Peer::doCount($c);
if ($count > kConf::get('copy_partner_limit_conversion_profiles')) {
throw new kCoreException("Template partner's number of [conversionProfile] objects exceeds allowed limit", kCoreException::TEMPLATE_PARTNER_COPY_LIMIT_EXCEEDED);
}
//entries
entryPeer::setUseCriteriaFilter(false);
$c = new Criteria();
$c->addAnd(entryPeer::PARTNER_ID, $templatePartner->getId());
$c->addAnd(entryPeer::TYPE, entryType::MEDIA_CLIP);
$c->addAnd(entryPeer::STATUS, entryStatus::READY);
$count = entryPeer::doCount($c);
if ($count > kConf::get('copy_partner_limit_entries')) {
throw new kCoreException("Template partner's number of MEDIA_CLIP objects exceed allowed limit", kCoreException::TEMPLATE_PARTNER_COPY_LIMIT_EXCEEDED);
}
entryPeer::setUseCriteriaFilter(true);
//playlists
entryPeer::setUseCriteriaFilter(false);
$c = new Criteria();
$c->addAnd(entryPeer::PARTNER_ID, $templatePartner->getId());
$c->addAnd(entryPeer::TYPE, entryType::PLAYLIST);
$c->addAnd(entryPeer::STATUS, entryStatus::READY);
$count = entryPeer::doCount($c);
if ($count > kConf::get('copy_partner_limit_playlists')) {
throw new kCoreException("Template partner's number of PLAYLIST objects exceed allowed limit", kCoreException::TEMPLATE_PARTNER_COPY_LIMIT_EXCEEDED);
}
entryPeer::setUseCriteriaFilter(true);
//flavor params
$c = new Criteria();
$c->add(assetParamsPeer::PARTNER_ID, $templatePartner->getId());
$count = assetParamsPeer::doCount($c);
if ($count > kConf::get('copy_partner_limit_flavor_params')) {
throw new kCoreException("Template partner's number of [flavorParams] objects exceeds allowed limit", kCoreException::TEMPLATE_PARTNER_COPY_LIMIT_EXCEEDED);
}
//uiconfs
uiConfPeer::setUseCriteriaFilter(false);
$c = new Criteria();
$c->addAnd(uiConfPeer::PARTNER_ID, $templatePartner->getId());
$c->addAnd(uiConfPeer::OBJ_TYPE, array(uiConf::UI_CONF_TYPE_KDP3, uiConf::UI_CONF_TYPE_WIDGET), Criteria::IN);
$c->addAnd(uiConfPeer::STATUS, uiConf::UI_CONF_STATUS_READY);
$count = uiConfPeer::doCount($c);
if ($count > kConf::get('copy_partner_limit_ui_confs')) {
throw new kCoreException("Template partner's number of [uiconf] objects exceeds allowed limit", kCoreException::TEMPLATE_PARTNER_COPY_LIMIT_EXCEEDED);
}
uiConfPeer::setUseCriteriaFilter(true);
//user roles
UserRolePeer::setUseCriteriaFilter(false);
$c = new Criteria();
$c->addAnd(UserRolePeer::PARTNER_ID, $templatePartner->getId(), Criteria::EQUAL);
$c->addAnd(UserRolePeer::STATUS, UserRoleStatus::ACTIVE, Criteria::EQUAL);
$count = UserRolePeer::doCount($c);
if ($count > kConf::get('copy_partner_limit_user_roles')) {
throw new kCoreException("Template partner's number of [userRole] objects exceed allowed limit", kCoreException::TEMPLATE_PARTNER_COPY_LIMIT_EXCEEDED);
}
UserRolePeer::setUseCriteriaFilter(true);
$validatorPlugins = KalturaPluginManager::getPluginInstances('IKalturaObjectValidator');
foreach ($validatorPlugins as $validatorPlugins) {
$validatorPlugins->validateObject($templatePartner, IKalturaObjectValidator::OPERATION_COPY);
}
}