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


PHP entryFilter::setIdIn方法代码示例

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


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

示例1: executeStaticPlaylistFromEntryIds

 public static function executeStaticPlaylistFromEntryIds(array $entry_id_list, $entry_filter = null, $detailed = true, $pager = null)
 {
     // if exists extra_filters - use the first one to filter the entry_id_list
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     $filter = new entryFilter();
     $filter->setIdIn($entry_id_list);
     $filter->setStatusEquel(entryStatus::READY);
     $filter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
     $filter->attachToCriteria($c);
     if (!self::$isAdminKs) {
         self::addSchedulingToCriteria($c);
     }
     self::addModerationToCriteria($c);
     if ($entry_filter) {
         if ($entry_filter->getLimit() > 0) {
             $limit = $entry_filter->getLimit();
         }
         $entry_filter->setLimit(null);
         // read the _eq_display_in_search field but ignore it because it's part of a more complex criterion - see bellow
         $display_in_search = $entry_filter->get("_eq_display_in_search");
         if ($display_in_search >= 2) {
             $entry_filter->set("_eq_display_in_search", null);
         }
         $entry_filter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
         $entry_filter->attachToCriteria($c);
         // add some hard-coded criteria
         $c->addAnd(entryPeer::TYPE, array(entryType::MEDIA_CLIP, entryType::MIX, entryType::LIVE_STREAM), Criteria::IN);
         // search only for clips or roughcuts
         $c->addAnd(entryPeer::STATUS, entryStatus::READY);
         // search only for READY entries
         if ($display_in_search >= 2) {
             // We don't allow searching in the KalturaNEtwork anymore (mainly for performance reasons)
             // allow only assets for the partner
             $c->addAnd(entryPeer::PARTNER_ID, $partner_id);
             //
             /*				
             				$crit = $c->getNewCriterion ( entryPeer::PARTNER_ID , $partner_id );
             				$crit->addOr ( $c->getNewCriterion ( entryPeer::DISPLAY_IN_SEARCH , $display_in_search ) );
             				$c->addAnd ( $crit );
             */
         }
     }
     if ($detailed) {
         $unsorted_entry_list = entryPeer::doSelectJoinkuser($c);
     } else {
         $unsorted_entry_list = entryPeer::doSelect($c);
     }
     // maybe join with kuser to add some data about the contributor
     // now sort the list according to $entry_id_list
     $entry_list = array();
     // build a map where the key is the id of the entry
     $id_list = self::buildIdMap($unsorted_entry_list);
     if ($pager) {
         $pageSize = $pager->calcPageSize();
         $startOffset = $pager->calcOffset();
     }
     // VERY STRANGE !! &$entry_id must be with a & or else the values of the array change !!!
     foreach ($entry_id_list as &$entry_id) {
         if ($entry_id != "") {
             $current_entry = @$id_list[$entry_id];
             if ($current_entry) {
                 if (isset($limit) && $limit-- === 0) {
                     break;
                 }
                 if ($pager) {
                     if ($startOffset > 0) {
                         $startOffset--;
                         continue;
                     } else {
                         if ($pageSize > 0) {
                             $pageSize--;
                         } else {
                             break;
                         }
                     }
                 }
                 // add to the entry_list only when the entry_id is not empty
                 $entry_list[] = $current_entry;
             }
         }
     }
     if (count($entry_list) == 0) {
         return null;
     }
     return $entry_list;
 }
开发者ID:GElkayam,项目名称:server,代码行数:86,代码来源:myPlaylistUtils.class.php

示例2: getLiveEntries

 /**
  * Returns all live entries that were live in the past X hours
  */
 protected function getLiveEntries(WSLiveReportsClient $client, $partnerId, KalturaFilterPager $pager)
 {
     // Get live entries list
     /** @var WSLiveEntriesListResponse */
     $response = $client->getLiveEntries($partnerId);
     if ($response->totalCount == 0) {
         return null;
     }
     // Hack to overcome the bug of single value
     $entryIds = $response->entries;
     if (!is_array($entryIds)) {
         $entryIds = array();
         $entryIds[] = $response->entries;
     }
     // Order entries by first broadcast
     $baseCriteria = KalturaCriteria::create(entryPeer::OM_CLASS);
     $filter = new entryFilter();
     $filter->setTypeEquel(KalturaEntryType::LIVE_STREAM);
     $filter->setIdIn($entryIds);
     $filter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
     $filter->attachToCriteria($baseCriteria);
     $baseCriteria->addAscendingOrderByColumn("entry.name");
     $pager->attachToCriteria($baseCriteria);
     $entries = entryPeer::doSelect($baseCriteria);
     $entryIds = array();
     foreach ($entries as $entry) {
         $entryIds[] = $entry->getId();
     }
     $totalCount = $baseCriteria->getRecordsCount();
     return array($entryIds, $totalCount);
 }
开发者ID:kubrickfr,项目名称:server,代码行数:34,代码来源:LiveReportsService.php

示例3: getStaticPlaylistFilters

 public static function getStaticPlaylistFilters(entry $playlist)
 {
     $entriesList = explode(',', $playlist->getDataContent());
     $filter = new entryFilter();
     $filter->setIdIn($entriesList);
     return array($filter);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:myPlaylistUtils.class.php


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