本文整理匯總了PHP中myEntryUtils::updateThumbnailFromFile方法的典型用法代碼示例。如果您正苦於以下問題:PHP myEntryUtils::updateThumbnailFromFile方法的具體用法?PHP myEntryUtils::updateThumbnailFromFile怎麽用?PHP myEntryUtils::updateThumbnailFromFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類myEntryUtils
的用法示例。
在下文中一共展示了myEntryUtils::updateThumbnailFromFile方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: updateEntryThumbnail
protected function updateEntryThumbnail()
{
if ($this->getEntryStatus() != entryStatus::READY || !strlen($this->getThumbnailUrl()) || $this->getThumbnailSaved()) {
return;
}
try {
$entry = entryPeer::retrieveByPKNoFilter($this->getObjectId());
myEntryUtils::updateThumbnailFromFile($entry, $this->getThumbnailUrl());
} catch (Exception $e) {
KalturaLog::err($e->getMessage());
return;
}
$this->setThumbnailSaved(true);
}
示例2: updateThumbnailJpegForEntry
protected function updateThumbnailJpegForEntry($entryId, $fileData, $entryType = null, $fileSyncType = entry::FILE_SYNC_ENTRY_SUB_TYPE_THUMB)
{
$dbEntry = entryPeer::retrieveByPK($entryId);
if (!$dbEntry || $entryType !== null && $dbEntry->getType() != $entryType) {
throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId);
}
// if session is not admin, we should check that the user that is updating the thumbnail is the one created the entry
// FIXME: Temporary disabled because update thumbnail feature (in app studio) is working with anonymous ks
/*if (!$this->getKs()->isAdmin())
{
if ($dbEntry->getPuserId() !== $this->getKs()->user)
{
throw new KalturaAPIException(KalturaErrors::PERMISSION_DENIED_TO_UPDATE_ENTRY);
}
}*/
myEntryUtils::updateThumbnailFromFile($dbEntry, $fileData["tmp_name"], $fileSyncType);
$entry = KalturaEntryFactory::getInstanceByType($dbEntry->getType());
$entry->fromObject($dbEntry, $this->getResponseProfile());
return $entry;
}
示例3: updateEntryThumbnail
protected function updateEntryThumbnail(BulkUploadResult $bulkUploadResult)
{
if ($bulkUploadResult->getEntryStatus() != entryStatus::READY || !strlen($bulkUploadResult->getThumbnailUrl()) || $bulkUploadResult->getThumbnailSaved()) {
return;
}
myEntryUtils::updateThumbnailFromFile($bulkUploadResult->getEntry(), $bulkUploadResult->getThumbnailUrl());
$bulkUploadResult->setThumbnailSaved(true);
$bulkUploadResult->save();
}