当前位置: 首页>>代码示例>>PHP>>正文


PHP assetParamsPeer::doCount方法代码示例

本文整理汇总了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);
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:KalturaAssetParamsFilter.php

示例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;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:32,代码来源:ThumbParamsService.php

示例3: doCount

 public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
 {
     self::getInstance();
     return parent::doCount($criteria, $distinct, $con);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:5,代码来源:flavorParamsPeer.php

示例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);
     }
 }
开发者ID:AdiTal,项目名称:server,代码行数:85,代码来源:myPartnerRegistration.class.php


注:本文中的assetParamsPeer::doCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。