本文整理匯總了PHP中asset::setDescription方法的典型用法代碼示例。如果您正苦於以下問題:PHP asset::setDescription方法的具體用法?PHP asset::setDescription怎麽用?PHP asset::setDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類asset
的用法示例。
在下文中一共展示了asset::setDescription方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getFileSyncForKey
private static function getFileSyncForKey(FileSyncKey $srcSyncKey, flavorParamsOutput $flavor, asset $flavorAsset, Partner $partner, &$addImportJob)
{
$addImportJob = false;
$isLocal = $flavor->getSourceRemoteStorageProfileId() == StorageProfile::STORAGE_KALTURA_DC;
if ($isLocal) {
list($fileSync, $local) = kFileSyncUtils::getReadyFileSyncForKey($srcSyncKey, true, false);
} else {
$fileSync = kFileSyncUtils::getReadyExternalFileSyncForKey($srcSyncKey, $flavor->getSourceRemoteStorageProfileId());
}
if (!$fileSync) {
kBatchManager::updateEntry($flavorAsset->getEntryId(), entryStatus::ERROR_CONVERTING);
if ($isLocal) {
$description = "Source file sync not found: {$srcSyncKey}";
} else {
$description = "Remote source file sync not found {$srcSyncKey}, storage profile id [" . $flavor->getSourceRemoteStorageProfileId() . "]";
}
$flavorAsset->setStatus(flavorAsset::FLAVOR_ASSET_STATUS_ERROR);
$flavorAsset->setDescription($description);
$flavorAsset->save();
KalturaLog::err($description);
return null;
}
if ($isLocal && !$local) {
if ($fileSync->getFileType() == FileSync::FILE_SYNC_FILE_TYPE_URL && $partner && $partner->getImportRemoteSourceForConvert()) {
$addImportJob = true;
} else {
throw new kCoreException("Source file not found for flavor conversion [{$flavorAsset->getId}()]", kCoreException::SOURCE_FILE_NOT_FOUND);
}
}
return $fileSync;
}