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


PHP entry::getSourceLink方法代码示例

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


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

示例1: 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

示例2: setDocumentType

 public function setDocumentType(entry $object)
 {
     $fileName = $object->getSourceLink();
     $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
     foreach (self::$fileExtensions as $documentType => $extensions) {
         if (in_array($ext, $extensions)) {
             $object->setMediaType($documentType);
             $object->setType(entryType::DOCUMENT);
             break;
         }
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:DocumentCreatedHandler.php

示例3: addEntryFromFlavorAsset

 protected function addEntryFromFlavorAsset(KalturaBaseEntry $newEntry, entry $srcEntry, flavorAsset $srcFlavorAsset)
 {
     $newEntry->type = $srcEntry->getType();
     if ($newEntry->name === null) {
         $newEntry->name = $srcEntry->getName();
     }
     if ($newEntry->description === null) {
         $newEntry->description = $srcEntry->getDescription();
     }
     if ($newEntry->creditUrl === null) {
         $newEntry->creditUrl = $srcEntry->getSourceLink();
     }
     if ($newEntry->creditUserName === null) {
         $newEntry->creditUserName = $srcEntry->getCredit();
     }
     if ($newEntry->tags === null) {
         $newEntry->tags = $srcEntry->getTags();
     }
     $newEntry->sourceType = KalturaSourceType::SEARCH_PROVIDER;
     $newEntry->searchProviderType = KalturaSearchProviderType::KALTURA;
     $dbEntry = $this->prepareEntryForInsert($newEntry);
     $dbEntry->setSourceId($srcEntry->getId());
     $kshow = $this->createDummyKShow();
     $kshowId = $kshow->getId();
     $msg = null;
     $flavorAsset = kFlowHelper::createOriginalFlavorAsset($this->getPartnerId(), $dbEntry->getId(), $msg);
     if (!$flavorAsset) {
         KalturaLog::err("Flavor asset not created for entry [" . $dbEntry->getId() . "] reason [{$msg}]");
         if ($dbEntry->getStatus() == entryStatus::NO_CONTENT) {
             $dbEntry->setStatus(entryStatus::ERROR_CONVERTING);
             $dbEntry->save();
         }
         throw new KalturaAPIException(KalturaErrors::ORIGINAL_FLAVOR_ASSET_NOT_CREATED, $msg);
     }
     $srcSyncKey = $srcFlavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
     $newSyncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
     kFileSyncUtils::createSyncFileLinkForKey($newSyncKey, $srcSyncKey);
     kEventsManager::raiseEvent(new kObjectAddedEvent($flavorAsset));
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_ADD, $dbEntry);
     $newEntry->fromObject($dbEntry, $this->getResponseProfile());
     return $newEntry;
 }
开发者ID:DBezemer,项目名称:server,代码行数:42,代码来源:KalturaEntryService.php


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