當前位置: 首頁>>代碼示例>>PHP>>正文


PHP KalturaServiceBase類代碼示例

本文整理匯總了PHP中KalturaServiceBase的典型用法代碼示例。如果您正苦於以下問題:PHP KalturaServiceBase類的具體用法?PHP KalturaServiceBase怎麽用?PHP KalturaServiceBase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了KalturaServiceBase類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: syncAssetsContent

 protected function syncAssetsContent(KalturaServiceBase $targetClientService, $targetAssetsContent, $targetAssets, $distributedMap, $sourceAssets)
 {
     $distributedMap = empty($distributedMap) ? array() : unserialize($distributedMap);
     foreach ($targetAssetsContent as $sourceAssetId => $targetAssetContent) {
         $targetAssetId = isset($targetAssets[$sourceAssetId]->id) ? $targetAssets[$sourceAssetId]->id : null;
         if (is_null($targetAssetId)) {
             throw new Exception('Missing target id of source asset id [' . $sourceAssetId . ']');
         }
         $currentSourceVersion = isset($sourceAssets[$sourceAssetId]->version) ? $sourceAssets[$sourceAssetId]->version : null;
         $lastDistributedSourceVersion = isset($distributedMap[$sourceAssetId][self::DISTRIBUTED_INFO_SOURCE_VERSION]) ? $distributedMap[$sourceAssetId][self::DISTRIBUTED_INFO_SOURCE_VERSION] : null;
         if (!is_null($currentSourceVersion) && !is_null($lastDistributedSourceVersion) && $currentSourceVersion <= $lastDistributedSourceVersion) {
             KalturaLog::info('No need to update content of source asset id [' . $sourceAssetId . '] target id [' . $targetAssetId . '] since it was not updated since last distribution');
         } else {
             KalturaLog::info('Updating content for source asset id [' . $sourceAssetId . '] target id [' . $targetAssetId . ']');
             $targetClientService->setContent($targetAssetId, $targetAssetContent);
         }
     }
 }
開發者ID:dozernz,項目名稱:server,代碼行數:18,代碼來源:CrossKalturaDistributionEngine.php

示例2:

 function __construct(KalturaClient $client = null)
 {
     parent::__construct($client);
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:4,代碼來源:KalturaMetadataClientPlugin.php


注:本文中的KalturaServiceBase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。