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


PHP KalturaCriteria::create方法代码示例

本文整理汇总了PHP中KalturaCriteria::create方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaCriteria::create方法的具体用法?PHP KalturaCriteria::create怎么用?PHP KalturaCriteria::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KalturaCriteria的用法示例。


在下文中一共展示了KalturaCriteria::create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Called on the server side and enables you to populate the object with any data from the DB
  * 
  * @param KalturaDistributionJobData $distributionJobData
  */
 public function __construct(KalturaDistributionJobData $distributionJobData = null)
 {
     parent::__construct($distributionJobData);
     if (!$distributionJobData) {
         return;
     }
     if (!$distributionJobData->distributionProfile instanceof KalturaFreewheelGenericDistributionProfile) {
         return;
     }
     $this->videoAssetFilePaths = new KalturaStringArray();
     // loads all the flavor assets that should be submitted to the remote destination site
     $flavorAssets = assetPeer::retrieveByIds(explode(',', $distributionJobData->entryDistribution->flavorAssetIds));
     foreach ($flavorAssets as $flavorAsset) {
         $videoAssetFilePath = new KalturaString();
         $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $videoAssetFilePath->value = kFileSyncUtils::getLocalFilePathForKey($syncKey, false);
         $this->videoAssetFilePaths[] = $videoAssetFilePath;
     }
     $thumbAssets = assetPeer::retrieveByIds(explode(',', $distributionJobData->entryDistribution->thumbAssetIds));
     if (count($thumbAssets)) {
         $thumbAsset = reset($thumbAssets);
         $syncKey = $thumbAssets->getSyncKey(thumbAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $this->thumbAssetFilePath = kFileSyncUtils::getLocalFilePathForKey($syncKey, false);
     }
     // entry cue points
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     $c->add(CuePointPeer::PARTNER_ID, $distributionJobData->entryDistribution->partnerId);
     $c->add(CuePointPeer::ENTRY_ID, $distributionJobData->entryDistribution->entryId);
     $c->add(CuePointPeer::TYPE, AdCuePointPlugin::getCuePointTypeCoreValue(AdCuePointType::AD));
     $c->addAscendingOrderByColumn(CuePointPeer::START_TIME);
     $cuePointsDb = CuePointPeer::doSelect($c);
     $this->cuePoints = KalturaCuePointArray::fromDbArray($cuePointsDb);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:38,代码来源:KalturaFreewheelGenericDistributionJobProviderData.php

示例2: fetchPage

 public function fetchPage($action, $filter, $my_pager, $base_criteria = null)
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
     $keywords = @$_REQUEST["keywords"];
     // $sort_alias is what is sent from the browser
     $sort_alias = $this->sort_alias != null ? $this->sort_alias : @$_REQUEST["sort"];
     //		$keywords_array = mySearchUtils::getKeywordsFromStr ( $keywords );
     if ($base_criteria != null) {
         $c = $base_criteria;
     } else {
         $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     }
     $filter->addSearchMatchToCriteria($c, $keywords, $this->getSearchableColumnName());
     // each entity can do specific modifications to the criteria
     $this->modifyCriteria($c);
     if ($this->skip_count) {
         $my_pager->attachCriteria($c, $this->getPeerMethod(), $this->getPeerCountMethod());
         //$res = $my_pager->fetchPage(null , true , 0);
         $res = $my_pager->fetchPage(null);
         // , true , 0);
     } else {
         $my_pager->attachCriteria($c, $this->getPeerMethod(), $this->getPeerCountMethod());
         $res = $my_pager->fetchPage();
     }
     return $res;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:26,代码来源:AJAX_getObjectsAction.class.php

示例3: doGetListResponse

 protected function doGetListResponse(KalturaFilterPager $pager, $type = null)
 {
     $this->validateEntryIdFiltered();
     if (!is_null($this->userIdEqualCurrent) && $this->userIdEqualCurrent) {
         $this->userIdEqual = kCurrentContext::getCurrentKsKuserId();
     } else {
         $this->translateUserIds();
     }
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     if ($type) {
         $c->add(CuePointPeer::TYPE, $type);
     }
     $entryIds = null;
     if ($this->entryIdEqual) {
         $entryIds = array($this->entryIdEqual);
     } else {
         if ($this->entryIdIn) {
             $entryIds = explode(',', $this->entryIdIn);
         }
     }
     if (!is_null($entryIds)) {
         $entryIds = entryPeer::filterEntriesByPartnerOrKalturaNetwork($entryIds, kCurrentContext::getCurrentPartnerId());
         if (!$entryIds) {
             return array(array(), 0);
         }
         $this->entryIdEqual = null;
         $this->entryIdIn = implode(',', $entryIds);
     }
     $cuePointFilter = $this->toObject();
     $cuePointFilter->attachToCriteria($c);
     $pager->attachToCriteria($c);
     $list = CuePointPeer::doSelect($c);
     return array($list, $c->getRecordsCount());
 }
开发者ID:visomar,项目名称:server,代码行数:34,代码来源:KalturaCuePointFilter.php

示例4: setDefaultCriteriaFilter

 /**
  * Creates default criteria filter
  */
 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(self::OM_CLASS);
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:11,代码来源:TagPeer.php

示例5: getFeedAction

 /**
  * @action getFeed
  * @disableTags TAG_WIDGET_SESSION,TAG_ENTITLEMENT_ENTRY,TAG_ENTITLEMENT_CATEGORY
  * @param int $distributionProfileId
  * @param string $hash
  * @return file
  */
 public function getFeedAction($distributionProfileId, $hash)
 {
     if (!$this->getPartnerId() || !$this->getPartner()) {
         throw new KalturaAPIException(KalturaErrors::INVALID_PARTNER_ID, $this->getPartnerId());
     }
     $profile = DistributionProfilePeer::retrieveByPK($distributionProfileId);
     if (!$profile || !$profile instanceof UverseDistributionProfile) {
         throw new KalturaAPIException(ContentDistributionErrors::DISTRIBUTION_PROFILE_NOT_FOUND, $distributionProfileId);
     }
     if ($profile->getStatus() != KalturaDistributionProfileStatus::ENABLED) {
         throw new KalturaAPIException(ContentDistributionErrors::DISTRIBUTION_PROFILE_DISABLED, $distributionProfileId);
     }
     if ($profile->getUniqueHashForFeedUrl() != $hash) {
         throw new KalturaAPIException(UverseDistributionErrors::INVALID_FEED_URL);
     }
     // "Creates advanced filter on distribution profile
     $distributionAdvancedSearch = new ContentDistributionSearchFilter();
     $distributionAdvancedSearch->setDistributionProfileId($profile->getId());
     $distributionAdvancedSearch->setDistributionSunStatus(EntryDistributionSunStatus::AFTER_SUNRISE);
     $distributionAdvancedSearch->setEntryDistributionStatus(EntryDistributionStatus::READY);
     $distributionAdvancedSearch->setHasEntryDistributionValidationErrors(false);
     //Creates entry filter with advanced filter
     $entryFilter = new entryFilter();
     $entryFilter->setStatusEquel(entryStatus::READY);
     $entryFilter->setModerationStatusNot(entry::ENTRY_MODERATION_STATUS_REJECTED);
     $entryFilter->setPartnerSearchScope($this->getPartnerId());
     $entryFilter->setAdvancedSearch($distributionAdvancedSearch);
     $baseCriteria = KalturaCriteria::create(entryPeer::OM_CLASS);
     $baseCriteria->add(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM, Criteria::NOT_EQUAL);
     $entryFilter->attachToCriteria($baseCriteria);
     $entries = entryPeer::doSelect($baseCriteria);
     $feed = new UverseFeed('uverse_template.xml');
     $feed->setDistributionProfile($profile);
     $feed->setChannelFields();
     $lastBuildDate = $profile->getUpdatedAt(null);
     foreach ($entries as $entry) {
         /* @var $entry entry */
         $entryDistribution = EntryDistributionPeer::retrieveByEntryAndProfileId($entry->getId(), $profile->getId());
         if (!$entryDistribution) {
             KalturaLog::err('Entry distribution was not found for entry [' . $entry->getId() . '] and profile [' . $profile->getId() . ']');
             continue;
         }
         $fields = $profile->getAllFieldValues($entryDistribution);
         $flavorAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getFlavorAssetIds()));
         $flavorAsset = reset($flavorAssets);
         $flavorAssetRemoteUrl = $entryDistribution->getFromCustomData(UverseEntryDistributionCustomDataField::REMOTE_ASSET_URL);
         $thumbAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getThumbAssetIds()));
         $feed->addItem($fields, $flavorAsset, $flavorAssetRemoteUrl, $thumbAssets);
         // we want to find the newest update time between all entries
         if ($entry->getUpdatedAt(null) > $lastBuildDate) {
             $lastBuildDate = $entry->getUpdatedAt(null);
         }
     }
     $feed->setChannelLastBuildDate($lastBuildDate);
     header('Content-Type: text/xml');
     echo $feed->getXml();
     die;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:65,代码来源:UverseService.php

示例6: getFeedAction

 /**
  * @action getFeed
  * @disableTags TAG_WIDGET_SESSION,TAG_ENTITLEMENT_ENTRY,TAG_ENTITLEMENT_CATEGORY
  * @param int $distributionProfileId
  * @param string $hash
  * @return file
  */
 public function getFeedAction($distributionProfileId, $hash)
 {
     if (!$this->getPartnerId() || !$this->getPartner()) {
         throw new KalturaAPIException(KalturaErrors::INVALID_PARTNER_ID, $this->getPartnerId());
     }
     $profile = DistributionProfilePeer::retrieveByPK($distributionProfileId);
     if (!$profile || !$profile instanceof SynacorHboDistributionProfile) {
         throw new KalturaAPIException(ContentDistributionErrors::DISTRIBUTION_PROFILE_NOT_FOUND, $distributionProfileId);
     }
     if ($profile->getStatus() != KalturaDistributionProfileStatus::ENABLED) {
         throw new KalturaAPIException(ContentDistributionErrors::DISTRIBUTION_PROFILE_DISABLED, $distributionProfileId);
     }
     if ($profile->getUniqueHashForFeedUrl() != $hash) {
         throw new KalturaAPIException(SynacorHboDistributionErrors::INVALID_FEED_URL);
     }
     // "Creates advanced filter on distribution profile
     $distributionAdvancedSearch = new ContentDistributionSearchFilter();
     $distributionAdvancedSearch->setDistributionProfileId($profile->getId());
     $distributionAdvancedSearch->setDistributionSunStatus(EntryDistributionSunStatus::AFTER_SUNRISE);
     $distributionAdvancedSearch->setEntryDistributionStatus(EntryDistributionStatus::READY);
     $distributionAdvancedSearch->setEntryDistributionFlag(EntryDistributionDirtyStatus::NONE);
     $distributionAdvancedSearch->setHasEntryDistributionValidationErrors(false);
     //Creates entry filter with advanced filter
     $entryFilter = new entryFilter();
     $entryFilter->setStatusEquel(entryStatus::READY);
     $entryFilter->setModerationStatusNot(entry::ENTRY_MODERATION_STATUS_REJECTED);
     $entryFilter->setPartnerSearchScope($this->getPartnerId());
     $entryFilter->setAdvancedSearch($distributionAdvancedSearch);
     $baseCriteria = KalturaCriteria::create(entryPeer::OM_CLASS);
     $baseCriteria->add(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM, Criteria::NOT_EQUAL);
     $entryFilter->attachToCriteria($baseCriteria);
     $entries = entryPeer::doSelect($baseCriteria);
     $feed = new SynacorHboFeed('synacor_hbo_feed_template.xml');
     $feed->setDistributionProfile($profile);
     $counter = 0;
     foreach ($entries as $entry) {
         /* @var $entry entry */
         $entryDistribution = EntryDistributionPeer::retrieveByEntryAndProfileId($entry->getId(), $profile->getId());
         if (!$entryDistribution) {
             KalturaLog::err('Entry distribution was not found for entry [' . $entry->getId() . '] and profile [' . $profile->getId() . ']');
             continue;
         }
         $fields = $profile->getAllFieldValues($entryDistribution);
         $flavorAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getFlavorAssetIds()));
         $thumbAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getThumbAssetIds()));
         $additionalAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getAssetIds()));
         $feed->addItem($fields, $entry, $flavorAssets, $thumbAssets, $additionalAssets);
         $counter++;
         //to avoid the cache exceeding the memory size
         if ($counter >= 100) {
             kMemoryManager::clearMemory();
             $counter = 0;
         }
     }
     header('Content-Type: text/xml');
     echo $feed->getXml();
     die;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:65,代码来源:SynacorHboService.php

示例7: getCuePoints

 /**
  * @param $partnerId
  * @param $entryId
  */
 protected function getCuePoints($partnerId, $entryId)
 {
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     $c->add(CuePointPeer::PARTNER_ID, $partnerId);
     $c->add(CuePointPeer::ENTRY_ID, $entryId);
     $c->add(CuePointPeer::TYPE, AdCuePointPlugin::getCuePointTypeCoreValue(AdCuePointType::AD));
     $c->addAscendingOrderByColumn(CuePointPeer::START_TIME);
     return CuePointPeer::doSelect($c);
 }
开发者ID:DBezemer,项目名称:server,代码行数:13,代码来源:ComcastMrssService.php

示例8: setDefaultCriteriaFilter

 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(kuserPeer::OM_CLASS);
     $c->addAnd(kuserPeer::STATUS, KuserStatus::DELETED, KalturaCriteria::NOT_EQUAL);
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:DBezemer,项目名称:server,代码行数:9,代码来源:kuserPeer.php

示例9: setDefaultCriteriaFilter

 /**
  * Creates default criteria filter
  */
 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(KuserKgroupPeer::OM_CLASS);
     $c->addAnd(KuserKgroupPeer::STATUS, array(KuserKgroupStatus::DELETED), Criteria::NOT_IN);
     $c->addAnd(KuserKgroupPeer::PARTNER_ID, kCurrentContext::getCurrentPartnerId(), Criteria::EQUAL);
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:kubrickfr,项目名称:server,代码行数:13,代码来源:KuserKgroupPeer.php

示例10: __construct

 /**
  * Called on the server side and enables you to populate the object with any data from the DB
  * 
  * @param KalturaDistributionJobData $distributionJobData
  */
 public function __construct(KalturaDistributionJobData $distributionJobData = null)
 {
     parent::__construct($distributionJobData);
     if (!$distributionJobData) {
         return;
     }
     if (!$distributionJobData->distributionProfile instanceof KalturaHuluDistributionProfile) {
         return;
     }
     // loads all the flavor assets that should be submitted to the remote destination site
     $flavorAssets = assetPeer::retrieveByIds(explode(',', $distributionJobData->entryDistribution->flavorAssetIds));
     if (count($flavorAssets)) {
         $flavorAsset = reset($flavorAssets);
         $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $this->videoAssetFilePath = kFileSyncUtils::getLocalFilePathForKey($syncKey, false);
     }
     $thumbAssets = assetPeer::retrieveByIds(explode(',', $distributionJobData->entryDistribution->thumbAssetIds));
     if (count($thumbAssets)) {
         $thumbAsset = reset($thumbAssets);
         $syncKey = $thumbAsset->getSyncKey(thumbAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $this->thumbAssetFilePath = kFileSyncUtils::getLocalFilePathForKey($syncKey, false);
     }
     $additionalAssets = assetPeer::retrieveByIds(explode(',', $distributionJobData->entryDistribution->assetIds));
     $this->captionLocalPaths = new KalturaStringArray();
     if (count($additionalAssets)) {
         $captionAssetFilePathArray = array();
         foreach ($additionalAssets as $additionalAsset) {
             $assetType = $additionalAsset->getType();
             $syncKey = $additionalAsset->getSyncKey(CaptionAsset::FILE_SYNC_ASSET_SUB_TYPE_ASSET);
             if (kFileSyncUtils::fileSync_exists($syncKey)) {
                 if ($assetType == CaptionPlugin::getAssetTypeCoreValue(CaptionAssetType::CAPTION) || $assetType == AttachmentPlugin::getAssetTypeCoreValue(AttachmentAssetType::ATTACHMENT)) {
                     $string = new KalturaString();
                     $string->value = kFileSyncUtils::getLocalFilePathForKey($syncKey, false);
                     $this->captionLocalPaths[] = $string;
                 }
             }
         }
     }
     $tempFieldValues = unserialize($this->fieldValues);
     $pattern = '/[^A-Za-z0-9_\\-]/';
     $seriesTitle = preg_replace($pattern, '', $tempFieldValues[HuluDistributionField::SERIES_TITLE]);
     $seasonNumber = preg_replace($pattern, '', $tempFieldValues[HuluDistributionField::SEASON_NUMBER]);
     $videoEpisodeNumber = preg_replace($pattern, '', $tempFieldValues[HuluDistributionField::VIDEO_EPISODE_NUMBER]);
     $videoTitle = preg_replace($pattern, '', $tempFieldValues[HuluDistributionField::VIDEO_TITLE]);
     $this->fileBaseName = $seriesTitle . '-' . $seasonNumber . '-' . $videoEpisodeNumber . '-' . $videoTitle;
     // entry cue points
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     $c->add(CuePointPeer::PARTNER_ID, $distributionJobData->entryDistribution->partnerId);
     $c->add(CuePointPeer::ENTRY_ID, $distributionJobData->entryDistribution->entryId);
     $c->add(CuePointPeer::TYPE, AdCuePointPlugin::getCuePointTypeCoreValue(AdCuePointType::AD));
     $c->addAscendingOrderByColumn(CuePointPeer::START_TIME);
     $cuePointsDb = CuePointPeer::doSelect($c);
     $this->cuePoints = KalturaCuePointArray::fromDbArray($cuePointsDb);
 }
开发者ID:DBezemer,项目名称:server,代码行数:59,代码来源:KalturaHuluDistributionJobProviderData.php

示例11: setDefaultCriteriaFilter

 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(UserEntryPeer::OM_CLASS);
     // when session is not admin, allow access to user's userEntries only
     if (kCurrentContext::$ks && !kCurrentContext::$is_admin_session) {
         $c->addAnd(UserEntryPeer::KUSER_ID, kCurrentContext::getCurrentKsKuserId());
     }
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:UserEntryPeer.php

示例12: resolveCategoryTag

function resolveCategoryTag(Tag $tag)
{
    $c = KalturaCriteria::create(categoryPeer::OM_CLASS);
    $c->add(categoryPeer::PARTNER_ID, $tag->getPartnerId());
    $categoryFilter = new categoryFilter();
    $categoryFilter->set('_mlikeand_tags', $tag->getTag());
    $categoryFilter->attachToCriteria($c);
    $count = $c->getRecordsCount();
    if (!$count) {
        $tag->delete();
    }
}
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:resolveTags.php

示例13: setDefaultCriteriaFilter

 /**
  * Creates default criteria filter
  */
 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(self::OM_CLASS);
     if (kEntitlementUtils::getEntitlementEnforcement()) {
         $privacyContexts = kEntitlementUtils::getKsPrivacyContextArray();
         $c->addAnd(self::PRIVACY_CONTEXT, $privacyContexts, Criteria::IN);
     }
     $c->addAnd(self::INSTANCE_COUNT, 0, Criteria::GREATER_THAN);
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:DBezemer,项目名称:server,代码行数:16,代码来源:TagPeer.php

示例14: doGetListResponse

 protected function doGetListResponse(KalturaFilterPager $pager, array $types = null)
 {
     $this->validateEntryIdFiltered();
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
     // verify access to the relevant entries - either same partner as the KS or kaltura network
     if ($this->entryIdEqual) {
         $entryIds = array($this->entryIdEqual);
     } else {
         if ($this->entryIdIn) {
             $entryIds = explode(',', $this->entryIdIn);
         } else {
             throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL, 'KalturaAssetFilter::entryIdEqual/KalturaAssetFilter::entryIdIn');
         }
     }
     $entryIds = array_slice($entryIds, 0, baseObjectFilter::getMaxInValues());
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     $c->addAnd(entryPeer::ID, $entryIds, Criteria::IN);
     $criterionPartnerOrKn = $c->getNewCriterion(entryPeer::PARTNER_ID, kCurrentContext::getCurrentPartnerId());
     $criterionPartnerOrKn->addOr($c->getNewCriterion(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_KALTURA_NETWORK));
     $c->addAnd($criterionPartnerOrKn);
     $dbEntries = entryPeer::doSelect($c);
     if (!$dbEntries) {
         return array(array(), 0);
     }
     $entryIds = array();
     foreach ($dbEntries as $dbEntry) {
         $entryIds[] = $dbEntry->getId();
     }
     $this->entryIdEqual = null;
     $this->entryIdIn = implode(',', $entryIds);
     // get the flavors
     $flavorAssetFilter = new AssetFilter();
     $this->toObject($flavorAssetFilter);
     $c = new Criteria();
     $flavorAssetFilter->attachToCriteria($c);
     if ($types) {
         $c->add(assetPeer::TYPE, $types, Criteria::IN);
     }
     $pager->attachToCriteria($c);
     $list = assetPeer::doSelect($c);
     $resultCount = count($list);
     if ($resultCount && $resultCount < $pager->pageSize) {
         $totalCount = ($pager->pageIndex - 1) * $pager->pageSize + $resultCount;
     } else {
         KalturaFilterPager::detachFromCriteria($c);
         $totalCount = assetPeer::doCount($c);
     }
     myDbHelper::$use_alternative_con = null;
     return array($list, $totalCount);
 }
开发者ID:visomar,项目名称:server,代码行数:50,代码来源:KalturaAssetFilter.php

示例15: getListResponse

 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $entryFilter = new QuizEntryFilter();
     $entryFilter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
     $this->toObject($entryFilter);
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $entryFilter->attachToCriteria($c);
     $list = entryPeer::doSelect($c);
     $response = new KalturaQuizListResponse();
     $response->objects = KalturaQuizArray::fromDbArray($list, $responseProfile);
     $response->totalCount = $c->getRecordsCount();
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:16,代码来源:KalturaQuizFilter.php


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