• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP entryPeer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: execute

 /**
  * Will anipulate a single entry
  */
 public function execute()
 {
     $this->forceSystemAuthentication();
     myDbHelper::$use_alternative_con = null;
     $command = $this->getP("command");
     if ($command == "updateEntry") {
         $id = $this->getP("id");
         $entry = entryPeer::retrieveByPK($id);
         if ($entry) {
             $name = $this->getP("name");
             $value = $this->getP("value");
             $obj_wrapper = objectWrapperBase::getWrapperClass($entry, 0);
             $updateable_fields = $obj_wrapper->getUpdateableFields("2");
             if (!in_array($name, $updateable_fields)) {
                 die;
             }
             if ($name) {
                 $setter = "set" . $name;
                 call_user_func(array($entry, $setter), $value);
                 $entry->save();
             }
         }
     }
     die;
 }
开发者ID:DBezemer,项目名称:server,代码行数:28,代码来源:executeCommandAction.class.php


示例2: getTokenizer

 /**
  * @return kUrlTokenizer
  */
 public function getTokenizer()
 {
     switch ($this->protocol) {
         case StorageProfile::PLAY_FORMAT_HTTP:
             $name = isset($this->params['http_auth_param_name']) ? $this->params['http_auth_param_name'] : "h";
             $key = isset($this->params['http_auth_key']) ? $this->params['http_auth_key'] : false;
             $gen = isset($this->params['http_auth_gen']) ? $this->params['http_auth_gen'] : false;
             $window = 0;
             $entry = entryPeer::retrieveByPK($this->entryId);
             if ($entry && $entry->getSecurityPolicy()) {
                 $window = 30;
             }
             if ($name && $key !== false && $gen !== false) {
                 return new kLevel3UrlTokenizer($name, $key, $gen, false, $window);
             }
             break;
         case StorageProfile::PLAY_FORMAT_RTMP:
             $name = isset($this->params['rtmp_auth_param_name']) ? $this->params['rtmp_auth_param_name'] : "h";
             $key = isset($this->params['rtmp_auth_key']) ? $this->params['rtmp_auth_key'] : false;
             $gen = isset($this->params['rtmp_auth_gen']) ? $this->params['rtmp_auth_gen'] : false;
             if ($name && $key !== false && $gen !== false) {
                 return new kLevel3UrlTokenizer($name, $key, $gen, true);
             }
             break;
     }
     return null;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:30,代码来源:kLevel3UrlManager.php


示例3: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $entry_id = $this->getPM("entry_id");
     $detailed = $this->getP("detailed", false);
     $entry = null;
     if ($entry_id) {
         $entry = entryPeer::retrieveByPK($entry_id);
     }
     if (!$entry) {
         $this->addError(APIErrors::INVALID_ENTRY_ID, $entry_id);
     } else {
         $kshow_id = $entry->getKshowId();
         $kshow = $entry->getKshow();
         if (!$kshow) {
             $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
         } else {
             $newKshow = myKshowUtils::shalowCloneById($kshow_id, $puser_kuser->getKuserId());
             if (!$newKshow) {
                 $this->addError(APIErrors::KSHOW_CLONE_FAILED, $kshow_id);
             } else {
                 $newEntry = $newKshow->getShowEntry();
                 $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
                 $wrapper = objectWrapperBase::getWrapperClass($newEntry, $level);
                 // TODO - remove this code when cache works properly when saving objects (in their save method)
                 $wrapper->removeFromCache("entry", $newEntry->getId());
                 $this->addMsg("entry", $wrapper);
             }
         }
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:30,代码来源:cloneroughcutAction.class.php


示例4: save

 public function save(PropelPDO $con = null)
 {
     if ($this->isColumnModified(accessControlPeer::DELETED_AT)) {
         if ($this->isDefault === true) {
             throw new Exception("Default access control profile can't be deleted");
         }
         $c = new Criteria();
         $c->add(entryPeer::ACCESS_CONTROL_ID, $this->getId());
         $entryCount = entryPeer::doCount($c);
         if ($entryCount > 0) {
             throw new Exception("Access control profile is linked with entries and can't be deleted");
         }
     }
     if ($this->isNew()) {
         $c = new Criteria();
         $c->add(accessControlPeer::PARTNER_ID, $this->partner_id);
         $count = accessControlPeer::doCount($c);
         if ($count >= Partner::MAX_ACCESS_CONTROLS) {
             throw new kCoreException("Max number of access control profiles was reached", kCoreException::MAX_NUMBER_OF_ACCESS_CONTROLS_REACHED);
         }
     }
     parent::save($con);
     // set this conversion profile as partners default
     $partner = PartnerPeer::retrieveByPK($this->partner_id);
     if ($partner && $this->isDefault === true) {
         $partner->setDefaultAccessControlId($this->getId());
         $partner->save();
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:29,代码来源:accessControl.php


示例5: addFavorite

 /**
 	const SUBJECT_TYPE_KSHOW = '1';
 	const SUBJECT_TYPE_ENTRY = '2';
 	const SUBJECT_TYPE_USER = '3';
 */
 public static function addFavorite(favorite $favorite)
 {
     self::add($favorite);
     $type = $favorite->getSubjectType();
     $id = $favorite->getSubjectId();
     if ($type == favorite::SUBJECT_TYPE_ENTRY) {
         $obj = entryPeer::retrieveByPK($id);
         if ($obj) {
             $v = $obj->getFavorites();
             self::inc($v);
             $obj->setFavorites($v);
         }
     } elseif ($type == favorite::SUBJECT_TYPE_KSHOW) {
         $obj = kshowPeer::retrieveByPK($id);
         if ($obj) {
             $v = $obj->getFavorites();
             self::inc($v);
             $obj->setFavorites($v);
         }
     } elseif ($type == favorite::SUBJECT_TYPE_USER) {
         $obj = kuserPeer::retrieveByPK($id);
         if ($obj) {
             $v = $obj->getFans();
             self::inc($v);
             $obj->setFans($v);
         }
     }
     // don't forget to save the modified object
     self::add($obj);
 }
开发者ID:DBezemer,项目名称:server,代码行数:35,代码来源:myStatisticsMgr.class.php


示例6: getEntry

 public function getEntry()
 {
     if ($this->aEntry == null && $this->getEntryId()) {
         $this->aEntry = entryPeer::retrieveByPKNoFilter($this->getEntryId());
     }
     return $this->aEntry;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:7,代码来源:BulkUploadResult.php


示例7: applyFilterFields

 protected function applyFilterFields(baseObjectFilter $filter)
 {
     /* @var $filter cuePointFilter */
     // Reduce the cache expiry when fetching live stream cuepoints
     $entryId = $filter->get('_in_entry_id');
     if ($entryId && strpos($entryId, ',') === false) {
         $entry = entryPeer::retrieveByPK($entryId);
         if ($entry && $entry->getType() == entryType::LIVE_STREAM) {
             kApiCache::setExpiry(self::LIVE_ENTRY_CUE_POINT_CACHE_EXPIRY_SECONDS);
         }
     }
     if ($filter->get('_free_text')) {
         $this->sphinxSkipped = false;
         $freeTexts = $filter->get('_free_text');
         KalturaLog::debug("Attach free text [{$freeTexts}]");
         $this->addFreeTextToMatchClauseByMatchFields($freeTexts, CuePointFilter::FREE_TEXT_FIELDS);
     }
     $filter->unsetByName('_free_text');
     if ($filter->get('_eq_is_public')) {
         $this->sphinxSkipped = false;
         $isPublic = $filter->get('_eq_is_public');
         $this->addCondition('is_public' . " = " . $isPublic);
     }
     $filter->unsetByName('_eq_is_public');
     return parent::applyFilterFields($filter);
 }
开发者ID:kubrickfr,项目名称:server,代码行数:26,代码来源:SphinxCuePointCriteria.php


示例8: createQuestionPdf

 public function createQuestionPdf()
 {
     $dbEntry = entryPeer::retrieveByPK($this->entryId);
     $title = "Here are the questions from  [" . $dbEntry->getName() . "]";
     KalturaLog::debug("Questions from  [" . $dbEntry->getName() . "]");
     $this->pdf->addTitle($title, $this->titleStyle);
     $questionType = QuizPlugin::getCuePointTypeCoreValue(QuizCuePointType::QUIZ_QUESTION);
     $questions = CuePointPeer::retrieveByEntryId($this->entryId, array($questionType));
     //arange the array so that the questions will be the key for the array
     $questArray = array();
     foreach ($questions as $question) {
         $questArray[$question->getName()] = $question;
     }
     //sort the array alphabetically according to its key; i.e. the question
     ksort($questArray, SORT_LOCALE_STRING);
     $questNum = 0;
     foreach ($questArray as $question) {
         $questNum += 1;
         $this->pdf->addList($questNum, $question->getName(), $this->listWithAddLineBeforeStyle);
         $this->pdf->addHeadline(6, "Optional Answers:", $this->heading6Style);
         $ansNum = 0;
         foreach ($question->getOptionalAnswers() as $optionalAnswer) {
             $ansNum += 1;
             $this->pdf->addList($ansNum, $optionalAnswer->getText(), $this->indentListStyle);
         }
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:27,代码来源:kQuizPdf.php


示例9: execute

 public function execute()
 {
     // keywords & page
     // keywords
     //		$keywords = $this->request->getRequestParameter ( "keywords" , "" );
     // page
     //		$page = $this->request->getRequestParameter ( "page" , "1" );
     $partner_id = $this->getP("partner_id", null);
     if (false && $partner_id) {
         $criteria_filter = enrtyPeer::getCriteriaFilter();
         $criteria = $criteria_filter->getFilter();
         $criteria->addAnd(entryPeer::PARTNER_ID, "(" . entryPeer::PARTNER_ID . "<100 OR " . entryPeer::PARTNER_ID . "={$partner_id} )", Criteria::CUSTOM);
         entryPeer::enable();
     }
     $page_size = 20;
     $entry_filter = new entryFilter();
     $entry_pager = new mySmartPager($this, "entry", $page_size);
     $act = new AJAX_getEntriesAction();
     $act->setIdList(NULL);
     $act->setSortAlias("ids");
     $act->setPublicOnly(true);
     $act->skip_count = false;
     $this->entry_results = $act->fetchPage($this, $entry_filter, $entry_pager);
     $this->getResponse()->setHttpHeader("Content-Type", "text/xml; charset=utf-8");
     $this->number_of_results = $entry_pager->getNumberOfResults();
     $this->number_of_pages = $entry_pager->getNumberOfPages();
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:27,代码来源:searchEntriesAction.class.php


示例10: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $obj_type = $this->getPM("obj_type");
     $obj_id = $this->getPM("obj_id");
     $command = $this->getPM("command");
     $value = $this->getP("value");
     $extra_info = $this->getP("extra_info");
     if ($obj_type == "entry") {
         $entry = entryPeer::retrieveByPK($obj_id);
         if ($command == "view") {
             PartnerActivity::incrementActivity($partner_id, PartnerActivity::PARTNER_ACTIVITY_KDP, PartnerActivity::PARTNER_SUB_ACTIVITY_KDP_VIEWS);
             myStatisticsMgr::incEntryViews($entry);
         } elseif ($command == "play") {
             PartnerActivity::incrementActivity($partner_id, PartnerActivity::PARTNER_ACTIVITY_KDP, PartnerActivity::PARTNER_SUB_ACTIVITY_KDP_PLAYS);
             myStatisticsMgr::incEntryPlays($entry);
         }
     } elseif ($obj_type == "kshow") {
         $kshow = kshowPeer::retrieveByPK($obj_id);
         if ($command == "view") {
             PartnerActivity::incrementActivity($partner_id, PartnerActivity::PARTNER_ACTIVITY_KDP, PartnerActivity::PARTNER_SUB_ACTIVITY_KDP_VIEWS);
             myStatisticsMgr::incKshowViews($kshow);
         } elseif ($command == "play") {
             PartnerActivity::incrementActivity($partner_id, PartnerActivity::PARTNER_ACTIVITY_KDP, PartnerActivity::PARTNER_SUB_ACTIVITY_KDP_PLAYS);
             myStatisticsMgr::incKshowPlays($kshow);
         }
     }
     $this->addMsg("collectedStats", "{$obj_type}, {$obj_id}, {$command}, {$value}, {$extra_info}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:28,代码来源:collectstatsAction.class.php


示例11: getObject

 public function getObject()
 {
     if ($this->m_object) {
         return $this->m_object;
     }
     $object_id = $this->object_id;
     if ($object_id == null) {
         return null;
     }
     switch ($this->getObjectType()) {
         case self::MODERATION_OBJECT_TYPE_KSHOW:
             $this->m_object = kshowPeer::retrieveByPK($object_id);
             break;
         case self::MODERATION_OBJECT_TYPE_ENTRY:
             // be able to fetch entries that are deleted
             entryPeer::allowDeletedInCriteriaFilter();
             $this->m_object = entryPeer::retrieveByPK($object_id);
             entryPeer::blockDeletedInCriteriaFilter();
             break;
         case self::MODERATION_OBJECT_TYPE_USER:
             // $object_id is the puser_id
             $puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($this->getPartnerId(), NULL, $object_id, true);
             if ($puser_kuser && $puser_kuser->getKuser()) {
                 $this->m_object = $puser_kuser->getKuser();
             }
             //				$this->m_object = kuserPeer::retrieveByPK( $object_id );
             break;
     }
     return $this->m_object;
 }
开发者ID:DBezemer,项目名称:server,代码行数:30,代码来源:moderation.php


示例12: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     if (!$puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $puser_id);
         return;
     }
     $time_offset = $this->getPM("time_offset");
     $entry_ids = $this->getPM("entry_ids");
     $detailed = $this->getP("detailed", false);
     $separator = $this->getP("separator", ",");
     $id_arr = explode($separator, $entry_ids);
     $limit = 50;
     $id_arr = array_splice($id_arr, 0, $limit);
     $entries = entryPeer::retrieveByPKs($id_arr);
     $updated_entries = array();
     if (!$entries) {
         $this->addError(APIErrors::INVALID_ENTRY_IDS, $entry_ids);
     } else {
         foreach ($entries as $entry) {
             if (!myEntryUtils::createThumbnailFromEntry($entry, $entry, $time_offset)) {
                 $this->addError(APIErrors::INVALID_ENTRY_TYPE, "ENTRY_TYPE_MEDIACLIP [" . $entry->getId() . "]");
                 continue;
             }
             $updated_entries[] = $entry;
             myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE_THUMBNAIL, $entry);
             $wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_DETAILED);
             $wrapper->removeFromCache("entry", $entry->getId());
         }
     }
     $this->addMsg("entries", objectWrapperBase::getWrapperClass($updated_entries, objectWrapperBase::DETAIL_LEVEL_REGULAR));
 }
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:updateentriesthumbnailsAction.class.php


示例13: postUpdate

 public function postUpdate(PropelPDO $con = null)
 {
     parent::postUpdate($con);
     categoryPeer::setUseCriteriaFilter(false);
     $category = categoryPeer::retrieveByPK($this->getCategoryId());
     categoryPeer::setUseCriteriaFilter(true);
     if (!$category) {
         throw new kCoreException('category id [' . $this->getCategoryId() . 'was not found', kCoreException::ID_NOT_FOUND);
     }
     $entry = entryPeer::retrieveByPK($this->getEntryId());
     if (!$entry && $this->getStatus() != CategoryEntryStatus::DELETED) {
         throw new kCoreException('entry id [' . $this->getEntryId() . 'was not found', kCoreException::ID_NOT_FOUND);
     }
     if ($entry && $this->getStatus() == CategoryEntryStatus::ACTIVE && $this->getColumnsOldValue(categoryEntryPeer::STATUS) == CategoryEntryStatus::PENDING) {
         $entry = $this->setEntryOnCategory($category, $entry);
     }
     if ($this->getStatus() == CategoryEntryStatus::REJECTED && $this->getColumnsOldValue(categoryEntryPeer::STATUS) == CategoryEntryStatus::PENDING) {
         $category->decrementPendingEntriesCount();
     }
     if ($this->getStatus() == CategoryEntryStatus::PENDING && $this->getColumnsOldValue(categoryEntryPeer::STATUS) == CategoryEntryStatus::REJECTED) {
         $category->incrementPendingEntriesCount();
     }
     if ($this->getStatus() == CategoryEntryStatus::DELETED) {
         if ($this->getColumnsOldValue(categoryEntryPeer::STATUS) == CategoryEntryStatus::ACTIVE) {
             $category->decrementEntriesCount($this->getEntryId());
             $category->decrementDirectEntriesCount($this->getEntryId());
             if ($entry && !categoryEntryPeer::getSkipSave()) {
                 $categories = array();
                 if (trim($entry->getCategories()) != '') {
                     $categories = explode(entry::ENTRY_CATEGORY_SEPARATOR, $entry->getCategories());
                     foreach ($categories as $index => $entryCategoryFullName) {
                         if ($entryCategoryFullName == $category->getFullName()) {
                             unset($categories[$index]);
                         }
                     }
                 }
                 $categoriesIds = array();
                 if (trim($entry->getCategoriesIds()) != '') {
                     $categoriesIds = explode(entry::ENTRY_CATEGORY_SEPARATOR, $entry->getCategoriesIds());
                     foreach ($categories as $index => $entryCategoryId) {
                         if ($entryCategoryId == $category->getId()) {
                             unset($categoriesIds[$index]);
                         }
                     }
                 }
                 $entry->setCategories(implode(entry::ENTRY_CATEGORY_SEPARATOR, $categories));
                 $entry->setCategoriesIds(implode(entry::ENTRY_CATEGORY_SEPARATOR, $categoriesIds));
                 $entry->save();
             }
             kEventsManager::raiseEvent(new kObjectDeletedEvent($this));
         }
         if ($this->getColumnsOldValue(categoryEntryPeer::STATUS) == CategoryEntryStatus::PENDING) {
             $category->decrementPendingEntriesCount();
         }
     }
     $category->save();
     if ($entry && !categoryEntryPeer::getSkipSave()) {
         $entry->indexToSearchIndex();
     }
 }
开发者ID:panigh,项目名称:server,代码行数:60,代码来源:categoryEntry.php


示例14: getUrlManagerByCdn

 /**
  * @param string $cdnHost
  * @param string $entryId
  * @return kUrlManager
  */
 public static function getUrlManagerByCdn($cdnHost, $entryId)
 {
     $class = 'kUrlManager';
     $cdnHost = preg_replace('/https?:\\/\\//', '', $cdnHost);
     $cdnHost = preg_replace('/:\\d+$/', '', $cdnHost);
     $params = null;
     $urlManagers = kConf::getMap('url_managers');
     if (isset($urlManagers[$cdnHost])) {
         $class = $urlManagers[$cdnHost]["class"];
         $params = @$urlManagers[$cdnHost]["params"];
         $entry = entryPeer::retrieveByPK($entryId);
         $urlManagersMap = kConf::getMap('url_managers');
         if ($entry && isset($urlManagersMap["override"])) {
             $overrides = $urlManagersMap["override"];
             $partnerId = $entry->getPartnerId();
             if (array_key_exists($partnerId, $overrides)) {
                 $overrides = $overrides[$partnerId];
                 foreach ($overrides as $override) {
                     if ($override['domain'] == $cdnHost) {
                         $params = array_merge($params, $override["params"]);
                     }
                 }
             }
         }
     }
     KalturaLog::log("Uses url manager [{$class}]");
     return new $class(null, $params, $entryId);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:33,代码来源:kUrlManager.php


示例15: getSuitableProfile

 /**
  * Will return the first virus scan profile of the entry's partner, that defines an entry filter suitable for the given entry.
  * @param int $entryId
  * @return VirusScanProfile the suitable profile object, or null if none found
  */
 public static function getSuitableProfile($entryId)
 {
     $entry = entryPeer::retrieveByPK($entryId);
     if (!$entry) {
         KalturaLog::err('Cannot find entry with id [' . $entryId . ']');
         return null;
     }
     if ($entry->getSource() == entry::ENTRY_MEDIA_SOURCE_WEBCAM) {
         return null;
     }
     $cProfile = new Criteria();
     $cProfile->addAnd(VirusScanProfilePeer::PARTNER_ID, $entry->getPartnerId());
     $cProfile->addAnd(VirusScanProfilePeer::STATUS, VirusScanProfileStatus::ENABLED, Criteria::EQUAL);
     $profiles = VirusScanProfilePeer::doSelect($cProfile);
     if (!$profiles) {
         KalturaLog::debug('No virus scan profiles found for partner [' . $entry->getPartnerId() . ']');
         return null;
     }
     foreach ($profiles as $profile) {
         $virusEntryFilter = $profile->getEntryFilterObject();
         if ($virusEntryFilter->matches($entry)) {
             KalturaLog::debug('Returning profile with id [' . $profile->getId() . ']');
             return $profile;
         }
     }
     return null;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:32,代码来源:VirusScanProfilePeer.php


示例16: getEntry

 /**
  * @return entry
  */
 public function getEntry()
 {
     if (!$this->aEntry && $this->getEntryId()) {
         $this->aEntry = entryPeer::retrieveByPK($this->getEntryId());
     }
     return $this->aEntry;
 }
开发者ID:DBezemer,项目名称:server,代码行数:10,代码来源:CaptionAssetItem.php


示例17: clearMemory

 public function clearMemory()
 {
     accessControlPeer::clearInstancePool();
     BatchJobPeer::clearInstancePool();
     BulkUploadResultPeer::clearInstancePool();
     categoryPeer::clearInstancePool();
     EmailIngestionProfilePeer::clearInstancePool();
     entryPeer::clearInstancePool();
     FileSyncPeer::clearInstancePool();
     flavorAssetPeer::clearInstancePool();
     flavorParamsConversionProfilePeer::clearInstancePool();
     flavorParamsOutputPeer::clearInstancePool();
     flavorParamsPeer::clearInstancePool();
     kshowPeer::clearInstancePool();
     mediaInfoPeer::clearInstancePool();
     moderationFlagPeer::clearInstancePool();
     moderationPeer::clearInstancePool();
     notificationPeer::clearInstancePool();
     roughcutEntryPeer::clearInstancePool();
     SchedulerConfigPeer::clearInstancePool();
     SchedulerPeer::clearInstancePool();
     SchedulerStatusPeer::clearInstancePool();
     SchedulerWorkerPeer::clearInstancePool();
     StorageProfilePeer::clearInstancePool();
     syndicationFeedPeer::clearInstancePool();
     TrackEntryPeer::clearInstancePool();
     uiConfPeer::clearInstancePool();
     UploadTokenPeer::clearInstancePool();
     // TODO clear default filters
     // TODO call all memory cleaner plugins
     if (function_exists('gc_collect_cycles')) {
         // php 5.3 and above
         gc_collect_cycles();
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:KalturaDispatcher.php


示例18: createPeriodicSyncPoints

 /**
  * Creates perioding metadata sync-point events on a live stream
  * 
  * @action createPeriodicSyncPoints
  * @actionAlias liveStream.createPeriodicSyncPoints
  * @param string $entryId Kaltura live-stream entry id
  * @param int $interval Events interval in seconds 
  * @param int $duration Duration in seconds
  * 
  * @throws KalturaErrors::ENTRY_ID_NOT_FOUND
  * @throws KalturaErrors::NO_MEDIA_SERVER_FOUND
  * @throws KalturaErrors::MEDIA_SERVER_SERVICE_NOT_FOUND
  */
 function createPeriodicSyncPoints($entryId, $interval, $duration)
 {
     $entryDc = substr($entryId, 0, 1);
     if ($entryDc != kDataCenterMgr::getCurrentDcId()) {
         $remoteDCHost = kDataCenterMgr::getRemoteDcExternalUrlByDcId($entryDc);
         kFileUtils::dumpApiRequest($remoteDCHost, true);
     }
     $dbEntry = entryPeer::retrieveByPK($entryId);
     if (!$dbEntry || $dbEntry->getType() != KalturaEntryType::LIVE_STREAM || !in_array($dbEntry->getSource(), array(KalturaSourceType::LIVE_STREAM, KalturaSourceType::LIVE_STREAM_ONTEXTDATA_CAPTIONS))) {
         throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId);
     }
     /* @var $dbEntry LiveStreamEntry */
     $mediaServers = $dbEntry->getMediaServers();
     if (!count($mediaServers)) {
         throw new KalturaAPIException(KalturaErrors::NO_MEDIA_SERVER_FOUND, $entryId);
     }
     foreach ($mediaServers as $key => $kMediaServer) {
         if ($kMediaServer && $kMediaServer instanceof kLiveMediaServer) {
             $mediaServer = $kMediaServer->getMediaServer();
             $mediaServerCuePointsService = $mediaServer->getWebService(MediaServer::WEB_SERVICE_CUE_POINTS);
             KalturaLog::debug("Sending sync points for DC [" . $mediaServer->getDc() . "] ");
             if ($mediaServerCuePointsService && $mediaServerCuePointsService instanceof KalturaMediaServerCuePointsService) {
                 KalturaLog::debug("Call createTimeCuePoints on DC [" . $mediaServer->getDc() . "] ");
                 $mediaServerCuePointsService->createTimeCuePoints($entryId, $interval, $duration);
             } else {
                 KalturaLog::debug("Media server service not found on DC: [" . $mediaServer->getDc() . "] ");
             }
         }
     }
 }
开发者ID:AdiTal,项目名称:server,代码行数:43,代码来源:LiveCuePointService.php


示例19: contributeMetadataObject

 /**
  * @param SimpleXMLElement $mrss
  * @param SimpleXMLElement $metadata
  * @param kMrssParameters $mrssParams
  * @return SimpleXMLElement
  */
 public function contributeMetadataObject(SimpleXMLElement $mrss, SimpleXMLElement $metadata, kMrssParameters $mrssParams = null, $currentXPath)
 {
     $currentXPath .= "/*[local-name()='" . $metadata->getName() . "']";
     $metadataObject = $mrss->addChild($metadata->getName());
     foreach ($metadata->attributes() as $attributeField => $attributeValue) {
         $metadataObject->addAttribute($attributeField, $attributeValue);
     }
     foreach ($metadata as $metadataField => $metadataValue) {
         if ($metadataValue instanceof SimpleXMLElement && count($metadataValue)) {
             $this->contributeMetadataObject($metadataObject, $metadataValue, $mrssParams, $currentXPath);
         } else {
             $metadataObject->addChild($metadataField, kString::stringToSafeXml($metadataValue));
             $itemXPath = $currentXPath . "/*[local-name()='{$metadataField}']";
             if ($mrssParams && is_array($mrssParams->getItemXpathsToExtend()) && in_array($itemXPath, $mrssParams->getItemXpathsToExtend())) {
                 $relatedEntry = entryPeer::retrieveByPK((string) $metadataValue);
                 if ($relatedEntry) {
                     $relatedItemField = $metadataObject->addChild($metadataField . '_item');
                     $recursionMrssParams = null;
                     if ($mrssParams) {
                         $recursionMrssParams = clone $mrssParams;
                         $recursionMrssParams->setItemXpathsToExtend(array());
                         // stop the recursion
                     }
                     $relatedEntryMrss = kMrssManager::getEntryMrssXml($relatedEntry, $relatedItemField, $recursionMrssParams);
                 }
             }
         }
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:35,代码来源:kMetadataMrssManager.php


示例20: doGetListResponse

 protected function doGetListResponse(KalturaFilterPager $pager, $type = null)
 {
     $this->validateEntryIdFiltered();
     $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:AdiTal,项目名称:server,代码行数:30,代码来源:KalturaCuePointFilter.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP eqLogic类代码示例发布时间:2022-05-23
下一篇:
PHP entryFilter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap