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


PHP kshowPeer类代码示例

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


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

示例1: createWidgetFromWidget

 /**
  * If 
  */
 public static function createWidgetFromWidget($parent_widget_obj_or_id, $kshow_id, $entry_id = null, $ui_conf_id = null, $custom_data = null, $partner_data = null, $security_type = null)
 {
     if ($parent_widget_obj_or_id == null) {
         throw new Exception("Cannot createWidget from empty object");
     }
     if ($parent_widget_obj_or_id instanceof widget) {
         $source_widget = $parent_widget_obj_or_id;
     } else {
         // assume its an id
         $source_widget = widgetPeer::retrieveByPK($parent_widget_obj_or_id);
         if (!$source_widget) {
             throw new Exception("Cannot createWidget from a none-existing widget [{$parent_widget_obj_or_id}]");
         }
     }
     $kshow = null;
     $widget_kshow_id = $source_widget->getKshowId();
     if (!$widget_kshow_id) {
         // fetch the kshow/entry according to the kshow_id/entry_id rules
         list($kshow, $entry, $error, $error_obj) = myKshowUtils::getKshowAndEntry($kshow_id, $entry_id);
         $widget_kshow_id = $kshow_id;
         if ($source_widget->getEntryId()) {
             $entry_id = $source_widget->getEntryId();
         }
     }
     if (!$kshow) {
         $kshow = kshowPeer::retrieveByPK($widget_kshow_id);
         if (!$kshow) {
             return null;
         }
     }
     return self::createWidget($kshow, $entry_id, $source_widget, $ui_conf_id, $custom_data, $partner_data, $security_type);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:35,代码来源:widget.php

示例2: getTopBands

 public static function getTopBands($number_of_results = self::NUMBER_OF_TOP_TO_DISPLAY, $rand = true)
 {
     if (self::$s_top_list_cache == NULL) {
         self::$s_top_list_cache = new myCache("topList", self::TOP_LIST_EXPIRY_IN_SECONDS);
     }
     $top_list_name = "kshowBands";
     //get_class( $cls );
     $top_list_full = self::$s_top_list_cache->get($top_list_name);
     if ($top_list_full == NULL) {
         $featuredIds = array(26404, 42551, 31401, 31554, 12913, 18309, 13411, 11931, 15789, 13948, 13380, 13929, 21944, 23057);
         //$top_list_full = kshowPeer::retrieveByPks($featuredIds);
         $c = new Criteria();
         $c->add(kshowPeer::ID, $featuredIds, Criteria::IN);
         $top_list_full = kshowPeer::doSelectJoinkuser($c);
         self::$s_top_list_cache->put($top_list_name, $top_list_full);
     }
     //if ( $number_of_results < 1 ) $number_of_results = self::NUMBER_OF_TOP_TO_DISPLAY;
     if ($rand) {
         // shuffle the array and return the first  $number_of_results
         if (is_array($top_list_full)) {
             shuffle($top_list_full);
         }
     }
     if (count($top_list_full) > $number_of_results) {
         $top_list_full = array_slice($top_list_full, 0, $number_of_results);
     }
     return $top_list_full;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:28,代码来源:___myTopListUtils.class.php

示例3: execute

 public function execute()
 {
     $this->getResponse()->setHttpHeader("Content-Type", "application/x-javascript");
     $kshow_id = $this->getRequestParameter('kshow_id', 0);
     $uid = kuser::ANONYMOUS_PUSER_ID;
     $kshow = kshowPeer::retrieveByPK($kshow_id);
     if (!$kshow) {
         return sfView::ERROR;
     }
     // kshow_id might be a string (something like "15483str") but it will be returned using retriveByPK anyways
     // lets make sure we pass just the id to the contribution wizard
     $kshow_id = $kshow->getId();
     $partner_id = $kshow->getPartnerId();
     $partner = PartnerPeer::retrieveByPK($partner_id);
     $subp_id = $kshow->getSubpId();
     $partner_secret = $partner->getSecret();
     $partner_name = $partner->getPartnerName();
     $kaltura_services = new startsessionAction();
     $kaltura_services->setInputParams(array("format" => kalturaWebserviceRenderer::RESPONSE_TYPE_PHP_ARRAY, "partner_id" => $partner_id, "subp_id" => $subp_id, "uid" => $uid, "secret" => $partner_secret));
     $result = $kaltura_services->internalExecute();
     $this->ks = @$result["result"]["ks"];
     $this->widget_host = requestUtils::getHost();
     $this->kshow_id = $kshow_id;
     $this->uid = $uid;
     $this->partner_id = $partner_id;
     $this->subp_id = $subp_id;
     $this->partner_name = $partner_name;
     return sfView::SUCCESS;
 }
开发者ID:DBezemer,项目名称:server,代码行数:29,代码来源:contributionWidgetJSAction.class.php

示例4: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getPM("kshow_id");
     $detailed = $this->getP("detailed", false);
     $kshow_indexedCustomData3 = $this->getP("indexedCustomData3");
     $kshow = null;
     if ($kshow_id == kshow::KSHOW_ID_USE_DEFAULT) {
         // see if the partner has some default kshow to add to
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser);
         if ($kshow) {
             $kshow_id = $kshow->getId();
         }
     } elseif ($kshow_id) {
         $kshow = kshowPeer::retrieveByPK($kshow_id);
     } elseif ($kshow_indexedCustomData3) {
         $kshow = kshowPeer::retrieveByIndexedCustomData3($kshow_indexedCustomData3);
     }
     if (!$kshow) {
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
     } else {
         $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
         $wrapper = objectWrapperBase::getWrapperClass($kshow, $level);
         // TODO - remove this code when cache works properly when saving objects (in their save method)
         $wrapper->removeFromCache("kshow", $kshow_id);
         $this->addMsg("kshow", $wrapper);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:27,代码来源:getkshowAction.class.php

示例5: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $this->response_type = kalturaWebserviceRenderer::RESPONSE_TYPE_HTML;
     //
     $widget_id = $this->getP("widget_id");
     $kshow_id = $this->getP("kshow_id");
     $entry_id = $this->getP("entry_id");
     $widget_type = $this->getP("widget_type", 1);
     // TODO -decide on a good default;
     if ($widget_id) {
         $this->addMsg("<b>", $this->createGenericWidgetHtml2($partner_id, $subp_id, $puser_id));
         return;
     }
     if (in_array($partner_id, array(321, 449))) {
         $widget_type = 60;
     }
     list($kshow, $entry, $error, $error_obj) = myKshowUtils::getKshowAndEntry($kshow_id, $entry_id);
     if ($error_obj) {
         $this->addError($error_obj);
         return;
     }
     $kshow = kshowPeer::retrieveByPK($kshow_id);
     if (!$kshow) {
         $this->addMsg("<b>", "Error: no such {$kshow_id}");
         return;
     }
     $this->addMsg("<b>", $this->createGenericWidgetHtml($partner_id, $subp_id, $kshow_id, $puser_id, $widget_type));
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:28,代码来源:___viewwidgetAction.class.php

示例6: 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

示例7: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getP("kshow_id");
     $detailed = $this->getP("detailed", false);
     $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
     $widget_size = $this->getP("size");
     $kshow_from_db = null;
     if ($kshow_id) {
         $kshow_from_db = kshowPeer::retrieveByPK($kshow_id);
     }
     if ($kshow_from_db) {
         $this->addMsg("kshow", objectWrapperBase::getWrapperClass($kshow_from_db, $level));
         $this->addMsg("already_exists_objects", 1);
         $this->addDebug("already_exists_objects", 1);
     } else {
         // no kshow to be found - creae a new one
         parent::executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser);
     }
     // create widget code for the new kshow
     $kshow = $this->getMsg("kshow");
     $kshow_id = $kshow->id;
     list($genericWidget, $myspaceWidget) = myKshowUtils::getEmbedPlayerUrl($kshow_id, null, false, "");
     $code = array("generic_code" => $genericWidget, "myspace_code" => $myspaceWidget);
     $this->addMsg("widget_code", $code);
 }
开发者ID:DBezemer,项目名称:server,代码行数:25,代码来源:generatewidgetAction.class.php

示例8: 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

示例9: 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

示例10: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getP("kshow_id", kshow::KSHOW_ID_USE_DEFAULT);
     $entry = null;
     if ($kshow_id == kshow::KSHOW_ID_USE_DEFAULT) {
         // see if the partner has some default kshow to add to
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser);
         if ($kshow) {
             $kshow_id = $kshow->getId();
         }
     } elseif ($kshow_id == kshow::KSHOW_ID_CREATE_NEW) {
         // if the partner allows - create a new kshow
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser, null, true);
         if ($kshow) {
             $kshow_id = $kshow->getId();
             $entry = $kshow->getShowEntry();
             // use the newly created kshow's roughcut
         }
     } else {
         $kshow = kshowPeer::retrieveByPK($kshow_id);
     }
     if (!$kshow) {
         // the partner is attempting to add an entry to some invalid or non-existing kwho
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
         return;
     }
     if (!$entry) {
         $entry = $kshow->createEntry(entry::ENTRY_MEDIA_TYPE_SHOW, $kshow->getProducerId(), "&auto_edit.jpg", "");
     }
     $obj_wrapper = objectWrapperBase::getWrapperClass($entry, 0);
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $entry, $this->getObjectPrefix() . "_", array("name", "tags", "groupId", "partnerData", "permissions", "screenName", "description", "indexedCustomData1"));
     $entry->save();
     $this->addMsg($this->getObjectPrefix(), objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_REGULAR));
     $this->addDebug("added_fields", $fields_modified);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:addroughcutentryAction.class.php

示例11: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getPM("kshow_id");
     $detailed = $this->getP("detailed", false);
     $kshow_indexedCustomData3 = $this->getP("indexedCustomData3");
     $kshow = null;
     if ($kshow_id) {
         $kshow = kshowPeer::retrieveByPK($kshow_id);
     } elseif ($kshow_indexedCustomData3) {
         $kshow = kshowPeer::retrieveByIndexedCustomData3($kshow_indexedCustomData3);
     }
     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 {
             $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
             $wrapper = objectWrapperBase::getWrapperClass($newKshow, $level);
             // TODO - remove this code when cache works properly when saving objects (in their save method)
             $wrapper->removeFromCache("kshow", $newKshow->getId());
             $this->addMsg("kshow", $wrapper);
         }
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:26,代码来源:clonekshowAction.class.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;
     }
     $kshow_id = $this->getPM("kshow_id");
     $kshow = kshowPeer::retrieveByPK($kshow_id);
     // even in case of an error - return the kshow object
     if (!$kshow) {
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
         return;
     } else {
         $desired_version = $this->getPM("kshow_version");
         $result = $kshow->rollbackVersion($desired_version);
         if (!$result) {
             $this->addError(APIErrors::ERROR_KSHOW_ROLLBACK, $kshow_id, $desired_version);
             return;
         }
     }
     // after calling this method - most probably the state of the kshow has changed in the cache
     $wrapper = objectWrapperBase::getWrapperClass($kshow, objectWrapperBase::DETAIL_LEVEL_REGULAR);
     $wrapper->removeFromCache("kshow", $kshow_id);
     $this->addMsg("kshow", $wrapper);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:25,代码来源:rollbackkshowAction.class.php

示例13: execute

 public function execute()
 {
     $this->forceSystemAuthentication();
     $partner_id = $this->getRequestParameter('partner_id', -1);
     if ($partner_id >= 0) {
         myPartnerUtils::applyPartnerFilters($partner_id);
     }
     $this->partner_id = $partner_id;
     $order = $this->getRequestParameter('sort', kshow::KSHOW_SORT_MOST_VIEWED);
     $page = $this->getRequestParameter('page', 1);
     //$this->producer_id = $this->getRequestParameter('producer_id', 0 );
     //$this->kaltura_part_of_flag = $this->getRequestParameter('partof', 0 );
     $pager = kshowPeer::getOrderedPager($order, 10, $page);
     $kshow_list = $pager->getResults();
     dashboardUtils::updateKshowsRoughcutCount($kshow_list);
     $kshowsData = array();
     foreach ($kshow_list as $kshow) {
         $kshowsData[] = $this->createKShowData($kshow, $order);
     }
     // following variables will be used by the view
     $this->firstTime = $this->getRequestParameter('first', 1) == 1;
     $this->order = $order;
     $this->page = $page;
     $this->lastPage = $pager->getLastPage();
     $this->numResults = $pager->getNbResults();
     $this->kshowsData = $kshowsData;
     // allow the action buttons to show only for shows the user produced, and only for authenticated users, on their own pages
     $this->allowactions = true;
     // !$this->kaltura_part_of_flag && $this->getUser()->isAuthenticated() && $this->getUser()->getAttribute('id') == $this->producer_id;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:30,代码来源:viewShowsAction.class.php

示例14: execute

 /**
  * Will investigate a single entry
  */
 public function execute()
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
     $this->forceSystemAuthentication();
     entryPeer::setUseCriteriaFilter(false);
     $this->result = NULL;
     $kshow_ids = @$_REQUEST["kshow_ids"];
     $this->kshow_ids = $kshow_ids;
     $this->kshow = NULL;
     $entry_ids = @$_REQUEST["entry_ids"];
     $this->entry_ids = $entry_ids;
     $this->entry = NULL;
     $this->show_entry = null;
     $show_entry_list = array();
     if (!empty($kshow_ids)) {
         $ids_arr = explode(",", $kshow_ids);
         $kshows = kshowPeer::retrieveByPKs($ids_arr);
         if (!$kshows) {
             $this->result = "No kshows [{$kshow_ids}] in DB";
             return;
         }
         foreach ($kshows as $kshow) {
             $show_entry = $kshow->getShowEntry();
             $show_entry_list[] = $show_entry;
         }
     } else {
         if (empty($entry_ids)) {
             $this->result = "Submit an entry_id of a kshow_id to fix";
             return;
         }
         $ids_arr = explode(",", $entry_ids);
         $entries = entryPeer::retrieveByPKs($ids_arr);
         if (!$entries) {
             $this->result = "No entries [{$entry_ids}] in DB";
             return;
         }
         foreach ($entries as $entry) {
             if ($entry->getType() != entryType::MIX) {
                 continue;
             }
             $show_entry_list[] = $entry;
         }
     }
     $fixed_data_list = array();
     foreach ($show_entry_list as $show_entry) {
         $fix_data = new fixData();
         $fix_data->show_entry = $show_entry;
         if ($show_entry->getType() != entryType::MIX) {
             $fix_data->error = "Entry is not a roughcut";
         } else {
             $fix_data->old_content = $show_entry->getMetadata();
             $fix_data->old_duration = $show_entry->getLengthInMsecs();
             $fix_data->fixed_content = $show_entry->fixMetadata(false);
             $fix_data->fixed_duration = $show_entry->getLengthInMsecs();
         }
         $fixed_data_list[] = $fix_data;
     }
     $this->fixed_data_list = $fixed_data_list;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:62,代码来源:fixMetadataAction.class.php

示例15: execute

 public function execute()
 {
     $this->forceSystemAuthentication();
     $kshow_id = @$_REQUEST["kshow_id"];
     $this->kshow_id = $kshow_id;
     $this->kshow = NULL;
     $entry_id = @$_REQUEST["entry_id"];
     $this->entry_id = $entry_id;
     $this->entry = NULL;
     $this->message = "";
     if (!empty($kshow_id)) {
         $this->kshow = kshowPeer::retrieveByPK($kshow_id);
         if (!$this->kshow) {
             $this->message = "Cannot find kshow [{$kshow_id}]";
         } else {
             $this->entry = $this->kshow->getShowEntry();
         }
     } elseif (!empty($kshow_id)) {
         $this->entry = entryPeer::retrieveByPK($entry_id);
         if (!$this->entry) {
             $this->message = "Cannot find entry [{$entry_id}]";
         } else {
             $this->kshow = $this->{$this}->entry->getKshow();
         }
     }
     if ($this->kshow) {
         $this->metadata = $this->kshow->getMetadata();
     } else {
         $this->metadata = "";
     }
     $pending_str = $this->getP("pending");
     $remove_pending = $this->getP("remove_pending");
     if ($this->metadata && ($remove_pending || $pending_str)) {
         if ($remove_pending) {
             $pending_str = "";
         }
         $xml_doc = new DOMDocument();
         $xml_doc->loadXML($this->metadata);
         $metadata = kXml::getFirstElement($xml_doc, "MetaData");
         $should_save = kXml::setChildElement($xml_doc, $metadata, "Pending", $pending_str, true);
         if ($remove_pending) {
             $should_save = kXml::setChildElement($xml_doc, $metadata, "LastPendingTimeStamp", "", true);
         }
         if ($should_save) {
             $fixed_content = $xml_doc->saveXML();
             $content_dir = myContentStorage::getFSContentRootPath();
             $file_name = realpath($content_dir . $this->entry->getDataPath());
             $res = file_put_contents($file_name, $fixed_content);
             // sync - NOTOK
             $this->metadata = $fixed_content;
         }
     }
     $this->pending = $pending_str;
     $this->kshow_id = $kshow_id;
     $this->entry_id = $entry_id;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:56,代码来源:editPendingAction.class.php


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