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


PHP entry::getId方法代码示例

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


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

示例1: fixIsmManifestForReplacedEntry

 private function fixIsmManifestForReplacedEntry($path)
 {
     $fileData = file_get_contents($path);
     $xml = new SimpleXMLElement($fileData);
     $ismcFileName = $xml->head->meta['content'];
     list($ismcObjectId, $version, $subType, $isAsset, $entryId) = $this->parseObjectId($ismcFileName);
     if ($entryId != $this->entry->getId()) {
         //replacement flow
         $flavorAssets = assetPeer::retrieveByEntryIdAndStatus($this->entry->getId(), asset::ASSET_STATUS_READY);
         foreach ($flavorAssets as $asset) {
             if ($asset->hasTag(assetParams::TAG_ISM_MANIFEST)) {
                 list($replacingFileName, $fileName) = $this->getReplacedAndReplacingFileNames($asset, flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ISMC);
                 if ($replacingFileName && $fileName) {
                     $fileData = str_replace("content=\"{$replacingFileName}\"", "content=\"{$fileName}\"", $fileData);
                 }
             } else {
                 list($replacingFileName, $fileName) = $this->getReplacedAndReplacingFileNames($asset, flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ASSET);
                 if ($replacingFileName && $fileName) {
                     $fileData = str_replace("src=\"{$replacingFileName}\"", "src=\"{$fileName}\"", $fileData);
                 }
             }
         }
         return $fileData;
     } else {
         return $fileData;
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:27,代码来源:serveIsmAction.class.php

示例2: copyAssets

 public function copyAssets(entry $toEntry, ThumbCuePoint $toCuePoint, $adjustedStartTime = null)
 {
     $timedThumbAsset = assetPeer::retrieveById($this->getAssetId());
     if (!$timedThumbAsset) {
         KalturaLog::debug("Can't retrieve timedThumbAsset with id: {$this->getAssetId()}");
         return;
     }
     // Offset the startTime according to the duration gap between the live and VOD entries
     if (!is_null($adjustedStartTime)) {
         $toCuePoint->setStartTime($adjustedStartTime);
     }
     $toCuePoint->save();
     // Must save in order to produce an id
     $timedThumbAsset->setCuePointID($toCuePoint->getId());
     // Set the destination cue point's id
     $timedThumbAsset->setCustomDataObj();
     // Write the cached custom data object into the thumb asset
     // Make a copy of the current thumb asset
     // copyToEntry will create a filesync softlink to the original filesync
     $toTimedThumbAsset = $timedThumbAsset->copyToEntry($toEntry->getId(), $toEntry->getPartnerId());
     $toCuePoint->setAssetId($toTimedThumbAsset->getId());
     $toCuePoint->save();
     // Restore the thumb asset's prev. cue point id (for good measures)
     $timedThumbAsset->setCuePointID($this->getId());
     $timedThumbAsset->setCustomDataObj();
     // Save the destination entry's thumb asset
     $toTimedThumbAsset->setCuePointID($toCuePoint->getId());
     $toTimedThumbAsset->save();
     KalturaLog::log("Saved cue point [{$toCuePoint->getId()}] and timed thumb asset [{$toTimedThumbAsset->getId()}]");
 }
开发者ID:kubrickfr,项目名称:server,代码行数:30,代码来源:ThumbCuePoint.php

示例3: entryCreated

 /**
  * @param entry $object
  * @return bool true if should continue to the next consumer
  */
 public function entryCreated(entry $object)
 {
     $mediaType = null;
     if ($object->getType() == entryType::AUTOMATIC) {
         KalturaLog::debug("entry id [" . $object->getId() . "] type [" . $object->getType() . "] source link [" . $object->getSourceLink() . "]");
         $mediaType = $object->getMediaType();
         if (isset(self::$fileExtensions[$mediaType])) {
             $object->setType(entryType::DOCUMENT);
         } elseif (is_null($mediaType) || $mediaType == entry::ENTRY_MEDIA_TYPE_ANY || $mediaType == entry::ENTRY_MEDIA_TYPE_AUTOMATIC) {
             $this->setDocumentType($object);
         }
     }
     if ($object->getType() != entryType::DOCUMENT) {
         KalturaLog::debug("entry id [" . $object->getId() . "] type [" . $object->getType() . "]");
         return true;
     }
     if (is_null($mediaType) || $mediaType == entry::ENTRY_MEDIA_TYPE_ANY || $mediaType == entry::ENTRY_MEDIA_TYPE_AUTOMATIC) {
         $this->setDocumentType($object);
     }
     if ($object instanceof DocumentEntry) {
         KalturaLog::debug("entry id [" . $object->getId() . "] already handled");
         return true;
     }
     KalturaLog::debug("Handling object [" . get_class($object) . "] type [" . $object->getType() . "] id [" . $object->getId() . "] status [" . $object->getStatus() . "]");
     if ($object->getConversionProfileId()) {
         $object->setStatus(entryStatus::PRECONVERT);
         $object->save();
     }
     return true;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:34,代码来源:DocumentCreatedHandler.php

示例4: setContextDataFlavorAssets

 private function setContextDataFlavorAssets($flavorTags)
 {
     $flavorParamsIds = null;
     $flavorParamsNotIn = false;
     if (!$this->isAdmin) {
         foreach ($this->contextDataResult->getActions() as $action) {
             if ($action->getType() == RuleActionType::BLOCK) {
                 //in case of block action do not set the list of flavors
                 return;
             }
             if ($action->getType() == RuleActionType::LIMIT_FLAVORS) {
                 /* @var $action kAccessControlLimitFlavorsAction */
                 $flavorParamsIds = explode(',', $action->getFlavorParamsIds());
                 $flavorParamsNotIn = $action->getIsBlockedList();
             }
         }
     }
     $flavorAssets = array();
     if (is_null($this->asset)) {
         if (count($flavorParamsIds)) {
             $flavorAssets = assetPeer::retrieveReadyByEntryIdAndFlavorParams($this->entry->getId(), $flavorParamsIds, $flavorParamsNotIn);
         } else {
             $flavorAssets = assetPeer::retrieveFlavorsByEntryIdAndStatus($this->entry->getId(), null, array(flavorAsset::ASSET_STATUS_READY));
         }
     } else {
         $flavorAllowed = true;
         if (count($flavorParamsIds)) {
             $flavorAllowed = $this->isFlavorAllowed($this->asset->getFlavorParamsId(), $flavorParamsIds, $flavorParamsNotIn);
         }
         if ($flavorAllowed) {
             $flavorAssets[] = $this->asset;
         }
     }
     $this->filterFlavorAssetsByTags($flavorAssets, $flavorTags);
 }
开发者ID:DBezemer,项目名称:server,代码行数:35,代码来源:kContextDataHelper.php

示例5: contribute

 /**
  * @param entry $entry
  * @param SimpleXMLElement $mrss
  * @return SimpleXMLElement
  */
 public function contribute(entry $entry, SimpleXMLElement $mrss)
 {
     $entryDistributions = EntryDistributionPeer::retrieveByEntryId($entry->getId());
     foreach ($entryDistributions as $entryDistribution) {
         $this->contributeDistribution($entryDistribution, $mrss);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:12,代码来源:kContentDistributionMrssManager.php

示例6: initFlavorIds

 protected function initFlavorIds()
 {
     $flavorIdsStr = $this->getRequestParameter("flavorIds", null);
     if ($flavorIdsStr) {
         $this->flavorIds = explode(",", $flavorIdsStr);
     }
     $this->flavorId = $this->getRequestParameter("flavorId", null);
     if (!$this->flavorId) {
         $flavorParamIds = $this->getRequestParameter("flavorParamIds", null);
         if ($flavorParamIds !== null) {
             $this->flavorIds = assetPeer::retrieveReadyFlavorsIdsByEntryId($this->entry->getId(), explode(",", $flavorParamIds));
             if (!$this->flavorIds || count($this->flavorIds) == 0) {
                 KExternalErrors::dieError(KExternalErrors::FLAVOR_NOT_FOUND);
             }
         } else {
             $flavorParamId = $this->getRequestParameter("flavorParamId", null);
             if ($flavorParamId || $flavorParamId === "0") {
                 $flavorAsset = assetPeer::retrieveByEntryIdAndParams($this->entry->getId(), $flavorParamId);
                 if (!$flavorAsset) {
                     KExternalErrors::dieError(KExternalErrors::FLAVOR_NOT_FOUND);
                 }
                 $this->flavorId = $flavorAsset->getId();
             }
         }
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:26,代码来源:playManifestAction.class.php

示例7: contribute

 /**
  * @param entry $entry
  * @param SimpleXMLElement $mrss
  * @return SimpleXMLElement
  */
 public function contribute(entry $entry, SimpleXMLElement $mrss)
 {
     $metadatas = MetadataPeer::retrieveAllByObject(Metadata::TYPE_ENTRY, $entry->getId());
     foreach ($metadatas as $metadata) {
         $this->contributeMetadata($metadata, $mrss);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:12,代码来源:kMetadataMrssManager.php

示例8: handleEntry

 protected function handleEntry($context, $feed, entry $entry, Entrydistribution $entryDistribution)
 {
     $fields = $this->profile->getAllFieldValues($entryDistribution);
     $flavorAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getFlavorAssetIds()));
     $thumbAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getThumbAssetIds()));
     $captionAssets = null;
     if ($this->profile instanceof ComcastMrssDistributionProfile && $this->profile->getShouldIncludeCaptions()) {
         KalturaLog::info("Adding entry captions.");
         $captionAssets = $this->getCaptions($entry->getPartnerId(), $entry->getId());
     }
     $cuePoints = null;
     if ($this->profile instanceof ComcastMrssDistributionProfile && $this->profile->getShouldIncludeCuePoints()) {
         KalturaLog::info("Adding entry cue points.");
         $cuePoints = $this->getCuePoints($entry->getPartnerId(), $entry->getId());
     }
     return $feed->getItemXml($fields, $flavorAssets, $thumbAssets, $captionAssets, $cuePoints);
 }
开发者ID:DBezemer,项目名称:server,代码行数:17,代码来源:ComcastMrssService.php

示例9: getAccessControlScope

 private function getAccessControlScope()
 {
     $accessControlScope = accessControlScope::partialInit();
     if ($this->_referrer) {
         $accessControlScope->setReferrer($this->_referrer);
     }
     $accessControlScope->setKs($this->_ks);
     $accessControlScope->setEntryId($this->_entry->getId());
     return $accessControlScope;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:10,代码来源:KSecureEntryHelper.class.php

示例10: getBroadcastUrl

 public function getBroadcastUrl(entry $entry, $mediaServerIndex)
 {
     $mediaServerConfig = kConf::get($mediaServerIndex, 'broadcast');
     $app = $mediaServerConfig['application'];
     $partnerId = $this->partnerId;
     $url = "rtmp://{$partnerId}.{$mediaServerIndex}." . kConf::get('domain', 'broadcast');
     $entryId = $entry->getId();
     $token = $entry->getStreamPassword();
     return "{$url}/{$app}/p/{$partnerId}/e/{$entryId}/i/{$mediaServerIndex}/t/{$token}";
 }
开发者ID:DBezemer,项目名称:server,代码行数:10,代码来源:kMultiCentersBroadcastUrlManager.php

示例11: updateAdminTags

 public static function updateAdminTags(entry $entry)
 {
     // be ready to update the admin_tags if the admin_tags OR the status was modified
     if ($entry->isColumnModified(entryPeer::ADMIN_TAGS) || $entry->isColumnModified(entryPeer::STATUS)) {
         $partner_id = $entry->getPartnerId();
         $admin_tags_str = self::getAdminTags($partner_id, null, true, $entry->getId());
         $admin_tags = explode(self::TAG_SEPARATOR, $admin_tags_str);
         $admin_tags = self::mergeAdminTags($admin_tags, $entry->getAdminTags());
         $after_change = self::sortAndSetAdminTags($partner_id, $admin_tags);
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:11,代码来源:ktagword.class.php

示例12: getAccessControlScope

 private function getAccessControlScope()
 {
     $scope = new accessControlScope();
     if ($this->referrer) {
         $scope->setReferrer($this->referrer);
     }
     $scope->setKs($this->ks);
     $scope->setEntryId($this->entry->getId());
     $scope->setContexts($this->contexts);
     return $scope;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:11,代码来源:KSecureEntryHelper.class.php

示例13: setContextDataFlavorAssets

 private function setContextDataFlavorAssets($flavorTags)
 {
     if ($this->entry->getType() == entryType::PLAYLIST && $this->entry->getMediaType() == entry::ENTRY_MEDIA_TYPE_TEXT) {
         list($entryIds, $durations, $mediaEntry) = myPlaylistUtils::executeStitchedPlaylist($this->entry);
         if (!$mediaEntry) {
             return;
         }
         $mediaEntryId = $mediaEntry->getId();
         $this->msDuration = array_sum($durations);
     } else {
         $mediaEntryId = $this->entry->getId();
         $this->msDuration = $this->entry->getLengthInMsecs();
     }
     $flavorParamsIds = null;
     $flavorParamsNotIn = false;
     if (!$this->isAdmin) {
         foreach ($this->contextDataResult->getActions() as $action) {
             if ($action->getType() == RuleActionType::BLOCK) {
                 //in case of block action do not set the list of flavors
                 return;
             }
             if ($action->getType() == RuleActionType::LIMIT_FLAVORS) {
                 /* @var $action kAccessControlLimitFlavorsAction */
                 $flavorParamsIds = explode(',', $action->getFlavorParamsIds());
                 $flavorParamsNotIn = $action->getIsBlockedList();
             }
         }
     }
     $flavorAssets = array();
     if (is_null($this->asset)) {
         if (count($flavorParamsIds)) {
             $flavorAssets = assetPeer::retrieveReadyByEntryIdAndFlavorParams($mediaEntryId, $flavorParamsIds, $flavorParamsNotIn);
         } else {
             $flavorAssets = assetPeer::retrieveFlavorsByEntryIdAndStatus($mediaEntryId, null, array(flavorAsset::ASSET_STATUS_READY));
         }
         if ($mediaEntryId != $this->entry->getId()) {
             // hack: setting the entry id of the flavors to the original playlist id
             //		since the player uses it in the playManifest url
             foreach ($flavorAssets as $flavorAsset) {
                 $flavorAsset->setEntryId($this->entry->getId());
             }
         }
     } else {
         $flavorAllowed = true;
         if (count($flavorParamsIds)) {
             $flavorAllowed = $this->isFlavorAllowed($this->asset->getFlavorParamsId(), $flavorParamsIds, $flavorParamsNotIn);
         }
         if ($flavorAllowed) {
             $flavorAssets[] = $this->asset;
         }
     }
     $this->filterFlavorAssetsByTags($flavorAssets, $flavorTags);
 }
开发者ID:wzur,项目名称:server,代码行数:53,代码来源:kContextDataHelper.php

示例14: syncCategoryEntries

 public function syncCategoryEntries(entry $vodEntry, LiveEntry $liveEntry)
 {
     $liveCategoryEntryArray = categoryEntryPeer::selectByEntryId($liveEntry->getId());
     if (!count($liveCategoryEntryArray)) {
         return;
     }
     foreach ($liveCategoryEntryArray as $categoryEntry) {
         /* @var $categoryEntry categoryEntry */
         $vodCategoryEntry = $categoryEntry->copy();
         $vodCategoryEntry->setEntryId($vodEntry->getId());
         $vodCategoryEntry->save();
     }
 }
开发者ID:AdiTal,项目名称:server,代码行数:13,代码来源:kObjectCreatedHandler.php

示例15: entryDeleted

 /**
  * @param entry $entry
  */
 protected function entryDeleted(entry $entry)
 {
     $this->syncableDeleted($entry->getId(), FileSyncObjectType::ENTRY);
     // delete flavor assets
     $c = new Criteria();
     $c->add(assetPeer::ENTRY_ID, $entry->getId());
     $c->add(assetPeer::STATUS, asset::FLAVOR_ASSET_STATUS_DELETED, Criteria::NOT_EQUAL);
     $c->add(assetPeer::DELETED_AT, null, Criteria::ISNULL);
     assetPeer::resetInstanceCriteriaFilter();
     $assets = assetPeer::doSelect($c);
     foreach ($assets as $asset) {
         $asset->setStatus(asset::FLAVOR_ASSET_STATUS_DELETED);
         $asset->setDeletedAt(time());
         $asset->save();
     }
     $c = new Criteria();
     $c->add(flavorParamsOutputPeer::ENTRY_ID, $entry->getId());
     $c->add(flavorParamsOutputPeer::DELETED_AT, null, Criteria::ISNULL);
     $flavorParamsOutputs = flavorParamsOutputPeer::doSelect($c);
     foreach ($flavorParamsOutputs as $flavorParamsOutput) {
         $flavorParamsOutput->setDeletedAt(time());
         $flavorParamsOutput->save();
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:27,代码来源:kObjectDeleteHandler.php


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