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


PHP Partner::getStorageServePriority方法代码示例

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


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

示例1: setContextDataStorageProfilesXml

 private function setContextDataStorageProfilesXml()
 {
     if (PermissionPeer::isValidForPartner(PermissionName::FEATURE_REMOTE_STORAGE_DELIVERY_PRIORITY, $this->entry->getPartnerId()) && $this->partner->getStorageServePriority() != StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_ONLY) {
         $asset = reset($this->allowedFlavorAssets);
         if (!$asset) {
             return;
         }
         $assetSyncKey = $asset->getSyncKey(asset::FILE_SYNC_ASSET_SUB_TYPE_ASSET);
         $fileSyncs = kFileSyncUtils::getAllReadyExternalFileSyncsForKey($assetSyncKey);
         $storageProfilesXML = new SimpleXMLElement("<StorageProfiles/>");
         foreach ($fileSyncs as $fileSync) {
             $storageProfileId = $fileSync->getDc();
             $storageProfile = StorageProfilePeer::retrieveByPK($storageProfileId);
             $deliveryProfileRtmp = DeliveryProfilePeer::getRemoteDeliveryByStorageId(DeliveryProfileDynamicAttributes::init($storageProfileId, $this->entry, PlaybackProtocol::RTMP));
             if (is_null($deliveryProfileRtmp) && (!$this->streamerType || $this->streamerType == PlaybackProtocol::AUTO)) {
                 $this->streamerType = PlaybackProtocol::HTTP;
                 $this->mediaProtocol = PlaybackProtocol::HTTP;
             }
             $storageProfileXML = $storageProfilesXML->addChild("StorageProfile");
             $storageProfileXML->addAttribute("storageProfileId", $storageProfileId);
             $storageProfileXML->addChild("Name", $storageProfile->getName());
             $storageProfileXML->addChild("SystemName", $storageProfile->getSystemName());
         }
         $this->storageProfilesXML = $storageProfilesXML->saveXML();
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:26,代码来源:kContextDataHelper.php

示例2: getExternalStorageUrl

 private static function getExternalStorageUrl(Partner $partner, asset $asset, FileSyncKey $key, $servePlayManifest = false, $playManifestClientTag = null, $storageId = null)
 {
     if (!$partner->getStorageServePriority() || $partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_ONLY) {
         return null;
     }
     if (is_null($storageId) && $partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_FIRST) {
         if (kFileSyncUtils::getReadyInternalFileSyncForKey($key)) {
             // check if having file sync on kaltura dcs
             return null;
         }
     }
     $fileSync = kFileSyncUtils::getReadyExternalFileSyncForKey($key, $storageId);
     if (!$fileSync) {
         return null;
     }
     $storage = StorageProfilePeer::retrieveByPK($fileSync->getDc());
     if (!$storage) {
         return null;
     }
     if ($servePlayManifest) {
         // in case of an https request, if a delivery profile which supports https doesn't exist use an http cdn api host
         if (infraRequestUtils::getProtocol() == infraRequestUtils::PROTOCOL_HTTPS && DeliveryProfilePeer::getRemoteDeliveryByStorageId(DeliveryProfileDynamicAttributes::init($fileSync->getDc(), $asset->getEntryId(), PlaybackProtocol::HTTP, "https"))) {
             $url = requestUtils::getApiCdnHost();
         } else {
             $url = infraRequestUtils::PROTOCOL_HTTP . "://" . kConf::get("cdn_api_host");
         }
         $url .= $asset->getPlayManifestUrl($playManifestClientTag, $storageId);
     } else {
         $urlManager = DeliveryProfilePeer::getRemoteDeliveryByStorageId(DeliveryProfileDynamicAttributes::init($fileSync->getDc(), $asset->getEntryId()));
         if ($urlManager) {
             $dynamicAttrs = new DeliveryProfileDynamicAttributes();
             $dynamicAttrs->setFileExtension($asset->getFileExt());
             $dynamicAttrs->setStorageId($fileSync->getDc());
             $urlManager->setDynamicAttributes($dynamicAttrs);
             $url = ltrim($urlManager->getFileSyncUrl($fileSync), '/');
             if (strpos($url, "://") === false) {
                 $url = rtrim($urlManager->getUrl(), "/") . "/" . $url;
             }
         } else {
             KalturaLog::debug("Couldn't determine delivery profile for storage id");
             $url = null;
         }
     }
     return $url;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:45,代码来源:kAssetUtils.class.php

示例3: getExternalStorageUrl

 private function getExternalStorageUrl(Partner $partner, flavorAsset $flavorAsset, FileSyncKey $key)
 {
     if (!$partner->getStorageServePriority() || $partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_ONLY) {
         return null;
     }
     if ($partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_FIRST) {
         if (kFileSyncUtils::getReadyInternalFileSyncForKey($key)) {
             // check if having file sync on kaltura dcs
             return null;
         }
     }
     $fileSync = kFileSyncUtils::getReadyExternalFileSyncForKey($key);
     if (!$fileSync) {
         return null;
     }
     $storage = StorageProfilePeer::retrieveByPK($fileSync->getDc());
     if (!$storage) {
         return null;
     }
     if ($this->syndicationFeedDb->getServePlayManifest()) {
         $deliveryProfile = DeliveryProfilePeer::getRemoteDeliveryByStorageId(DeliveryProfileDynamicAttributes::init($storage->getId(), $flavorAsset->getEntryId(), PlaybackProtocol::HTTP, "https"));
         $clientTag = 'feed:' . $this->syndicationFeedDb->getId();
         if (is_null($deliveryProfile)) {
             $url = infraRequestUtils::PROTOCOL_HTTP . "://" . kConf::get("cdn_api_host");
         } else {
             $url = requestUtils::getApiCdnHost();
         }
         $url .= $flavorAsset->getPlayManifestUrl($clientTag, $storage->getId());
     } else {
         $dpda = new DeliveryProfileDynamicAttributes();
         $urlManager = DeliveryProfilePeer::getRemoteDeliveryByStorageId(DeliveryProfileDynamicAttributes::init($fileSync->getDc(), $flavorAsset->getEntryId()), null, $flavorAsset);
         $url = ltrim($urlManager->getFileSyncUrl($fileSync), '/');
         if (strpos($url, "://") === false) {
             $url = rtrim($urlManager->getUrl(), "/") . "/" . $url;
         }
     }
     return $url;
 }
开发者ID:AdiTal,项目名称:server,代码行数:38,代码来源:KalturaSyndicationFeedRenderer.php

示例4: getExternalStorageUrl

 private function getExternalStorageUrl(Partner $partner, flavorAsset $flavorAsset, FileSyncKey $key)
 {
     if (!$partner->getStorageServePriority() || $partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_ONLY) {
         return null;
     }
     if ($partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_FIRST) {
         if (kFileSyncUtils::getReadyInternalFileSyncForKey($key)) {
             // check if having file sync on kaltura dcs
             return null;
         }
     }
     $fileSync = kFileSyncUtils::getReadyExternalFileSyncForKey($key);
     if (!$fileSync) {
         return null;
     }
     $storage = StorageProfilePeer::retrieveByPK($fileSync->getDc());
     if (!$storage) {
         return null;
     }
     $urlManager = kUrlManager::getUrlManagerByStorageProfile($fileSync->getDc(), $flavorAsset->getEntryId());
     $urlManager->setFileExtension($flavorAsset->getFileExt());
     $url = $storage->getDeliveryHttpBaseUrl() . '/' . $urlManager->getFileSyncUrl($fileSync);
     return $url;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:24,代码来源:KalturaSyndicationFeedRenderer.php


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