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


PHP FileSyncPeer::retrieveByWamsAssetId方法代碼示例

本文整理匯總了PHP中FileSyncPeer::retrieveByWamsAssetId方法的典型用法代碼示例。如果您正苦於以下問題:PHP FileSyncPeer::retrieveByWamsAssetId方法的具體用法?PHP FileSyncPeer::retrieveByWamsAssetId怎麽用?PHP FileSyncPeer::retrieveByWamsAssetId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FileSyncPeer的用法示例。


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

示例1: __construct

 /**
  * @param string $srcWAMSAssetId
  * @param string $targetPath
  */
 public function __construct($srcWAMSAssetId, $targetPath)
 {
     KalturaLog::debug("Creation instance of KWAMSThumbnailMaker srcWAMSAssetId = [{$srcWAMSAssetId}] targetPath = [{$targetPath}]");
     $this->srcWAMSAssetId = $srcWAMSAssetId;
     $this->targetPath = $targetPath;
     DbManager::setConfig(kConf::getDB());
     DbManager::initialize();
     $fileSync = FileSyncPeer::retrieveByWamsAssetId($srcWAMSAssetId);
     if (!empty($fileSync)) {
         $this->partnerId = $fileSync->getPartnerId();
     }
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:16,代碼來源:KWAMSThumbnailMaker.php

示例2: __construct

 /**
  * Creates instance of class and initializes properties
  * @param string $type
  * @param string $filePath
  * @param KSchedularTaskConfig $taskConfig
  */
 public function __construct($type, $filePath, KSchedularTaskConfig $taskConfig, KalturaBatchJob $job, $wamsAssetId)
 {
     $this->wamsAssetId = $wamsAssetId;
     $this->filePath = $filePath;
     $this->mediaInfoParser = parent::getParser($type, $filePath, $taskConfig, $job);
     $this->partnerId = $job->partnerId;
     DbManager::setConfig(kConf::getDB());
     DbManager::initialize();
     $fileSync = FileSyncPeer::retrieveByWamsAssetId($this->wamsAssetId);
     if ($fileSync) {
         $flavorAsset = kFileSyncUtils::retrieveObjectForFileSync($fileSync);
         if ($flavorAsset instanceof asset) {
             $this->originalMediaInfo = mediaInfoPeer::retrieveOriginalByEntryId($flavorAsset->getEntryId());
             $entry = $flavorAsset->getentry();
             if ($entry) {
                 $this->mediaType = $entry->getMediaType();
             }
         }
     }
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:26,代碼來源:KWAMSMediaInfoParser.php

示例3: getEntryName

 private function getEntryName($assetId)
 {
     $fileSync = FileSyncPeer::retrieveByWamsAssetId($assetId);
     if (!$fileSync) {
         return null;
     }
     $asset = kFileSyncUtils::retrieveObjectForFileSync($fileSync);
     if (!$asset) {
         return null;
     }
     $entry = $asset->getentry();
     if (!$entry) {
         return null;
     }
     $replacedId = $entry->getReplacedEntryId();
     if (!empty($replacedId)) {
         $entry = entryPeer::retrieveByPK($replacedId);
     }
     return $entry->getName();
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:20,代碼來源:kWAMS.php

示例4: dumpFile

 private function dumpFile($file_path, $file_name, $wams_asset_id = null, $wams_url = null)
 {
     $relocate = $this->getRequestParameter("relocate");
     $directServe = $this->getRequestParameter("direct_serve");
     if (!$relocate) {
         $url = $_SERVER["REQUEST_URI"];
         if (strpos($url, "?") !== false) {
             $url .= "&relocate=";
         } else {
             $url .= "/relocate/";
         }
         $url .= $this->encodeUrl($file_name);
         kFile::cacheRedirect($url);
         header("Location: {$url}");
         die;
     } else {
         if (!$directServe) {
             header("Content-Disposition: attachment; filename=\"{$file_name}\"");
         }
         if (!empty($wams_asset_id)) {
             $fileSync = FileSyncPeer::retrieveByWamsAssetId($wams_asset_id);
             kWAMS::getInstance($fileSync->getPartnerId())->dumpFile($wams_asset_id, pathinfo($file_name, PATHINFO_EXTENSION));
         } else {
             $mime_type = kFile::mimeType($file_path);
             kFile::dumpFile($file_path, $mime_type);
         }
     }
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:28,代碼來源:downloadAction.class.php


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