本文整理匯總了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);
}
}
}
示例2:
function __construct(KalturaClient $client = null)
{
parent::__construct($client);
}
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:4,代碼來源:KalturaMetadataClientPlugin.php