本文整理汇总了PHP中StorageProfilePeer类的典型用法代码示例。如果您正苦于以下问题:PHP StorageProfilePeer类的具体用法?PHP StorageProfilePeer怎么用?PHP StorageProfilePeer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StorageProfilePeer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getStorageProfile
protected static function getStorageProfile($storageProfileId = null)
{
if (is_null($storageProfileId)) {
return kDataCenterMgr::getCurrentStorageProfile();
}
return StorageProfilePeer::retrieveByPK($storageProfileId);
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:7,代码来源:kPathManager.php
示例2: getTokenizer
/**
* @return kUrlTokenizer
*/
public function getTokenizer()
{
$secret = null;
switch ($this->protocol) {
case StorageProfile::PLAY_FORMAT_HTTP:
if (@$this->params['http_auth_salt']) {
$storageProfile = StorageProfilePeer::retrieveByPK($this->storageProfileId);
if ($storageProfile) {
// get parameters
$window = $this->params['http_auth_seconds'];
$secret = $this->params['http_auth_salt'];
$useDummyHost = false;
$httpBaseUrl = rtrim($storageProfile->getDeliveryHttpBaseUrl(), '/');
}
}
break;
case StorageProfile::PLAY_FORMAT_RTMP:
if (@$this->params['rtmp_auth_salt']) {
$window = $this->params['rtmp_auth_seconds'];
$secret = $this->params['rtmp_auth_salt'];
$useDummyHost = true;
$httpBaseUrl = '';
}
break;
}
if ($secret) {
if (is_null($window) || !is_int($window)) {
$window = self::DEFAULT_ACCESS_WINDOW_SECONDS;
}
return new kMirrorImageUrlTokenizer($window, $secret, $useDummyHost, $httpBaseUrl);
}
return null;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:36,代码来源:kMirrorImageUrlManager.php
示例3: retrieveExternalByPartnerId
public static function retrieveExternalByPartnerId($partnerId, $con = null)
{
$criteria = new Criteria(StorageProfilePeer::DATABASE_NAME);
$criteria->add(StorageProfilePeer::PARTNER_ID, $partnerId);
$criteria->add(StorageProfilePeer::STATUS, array(StorageProfile::STORAGE_STATUS_AUTOMATIC, StorageProfile::STORAGE_STATUS_MANUAL), Criteria::IN);
return StorageProfilePeer::doSelect($criteria, $con);
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:7,代码来源:StorageProfilePeer.php
示例4: clearMemory
public function clearMemory()
{
accessControlPeer::clearInstancePool();
BatchJobPeer::clearInstancePool();
BulkUploadResultPeer::clearInstancePool();
categoryPeer::clearInstancePool();
EmailIngestionProfilePeer::clearInstancePool();
entryPeer::clearInstancePool();
FileSyncPeer::clearInstancePool();
flavorAssetPeer::clearInstancePool();
flavorParamsConversionProfilePeer::clearInstancePool();
flavorParamsOutputPeer::clearInstancePool();
flavorParamsPeer::clearInstancePool();
kshowPeer::clearInstancePool();
mediaInfoPeer::clearInstancePool();
moderationFlagPeer::clearInstancePool();
moderationPeer::clearInstancePool();
notificationPeer::clearInstancePool();
roughcutEntryPeer::clearInstancePool();
SchedulerConfigPeer::clearInstancePool();
SchedulerPeer::clearInstancePool();
SchedulerStatusPeer::clearInstancePool();
SchedulerWorkerPeer::clearInstancePool();
StorageProfilePeer::clearInstancePool();
syndicationFeedPeer::clearInstancePool();
TrackEntryPeer::clearInstancePool();
uiConfPeer::clearInstancePool();
UploadTokenPeer::clearInstancePool();
// TODO clear default filters
// TODO call all memory cleaner plugins
if (function_exists('gc_collect_cycles')) {
// php 5.3 and above
gc_collect_cycles();
}
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:KalturaDispatcher.php
示例5: getCurrentStorageProfile
/**
* @return StorageProfile
*/
public static function getCurrentStorageProfile()
{
if (self::$currentStorageProfile) {
return self::$currentStorageProfile;
}
self::$currentStorageProfile = StorageProfilePeer::retrieveByPK(self::getCurrentDcId());
return self::$currentStorageProfile;
}
开发者ID:DBezemer,项目名称:server,代码行数:11,代码来源:kDataCenterMgr.class.php
示例6: validateEntry
public function validateEntry(entry $dbEntry)
{
parent::validateEntry($dbEntry);
$this->validatePropertyNotNull('storageProfileId');
$storageProfile = StorageProfilePeer::retrieveByPK($this->storageProfileId);
if (!$storageProfile) {
throw new KalturaAPIException(KalturaErrors::STORAGE_PROFILE_ID_NOT_FOUND, $this->storageProfileId);
}
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:9,代码来源:KalturaRemoteStorageResource.php
示例7: validateForUsage
public function validateForUsage($sourceObject, $propertiesToSkip = array())
{
parent::validateForUsage($sourceObject, $propertiesToSkip);
$this->validatePropertyNotNull('storageProfileId');
$storageProfile = StorageProfilePeer::retrieveByPK($this->storageProfileId);
if (!$storageProfile) {
throw new KalturaAPIException(KalturaErrors::STORAGE_PROFILE_ID_NOT_FOUND, $this->storageProfileId);
}
}
开发者ID:DBezemer,项目名称:server,代码行数:9,代码来源:KalturaRemoteStorageResource.php
示例8: getUrlManagerByStorageProfile
/**
* @param int $storageProfileId
* @return kUrlManager
*/
public static function getUrlManagerByStorageProfile($storageProfileId)
{
$class = 'kUrlManager';
$storageProfile = StorageProfilePeer::retrieveByPK($storageProfileId);
if ($storageProfile && $storageProfile->getUrlManagerClass() && class_exists($storageProfile->getUrlManagerClass())) {
$class = $storageProfile->getUrlManagerClass();
}
KalturaLog::log("Uses url manager [{$class}]");
return new $class($storageProfileId);
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:14,代码来源:kUrlManager.php
示例9: doGetFileSyncUrl
protected function doGetFileSyncUrl(FileSync $fileSync)
{
$storageProfile = StorageProfilePeer::retrieveByPK($this->params->getStorageId());
/* @var $storageProfile KontikiStorageProfile */
$kontikiAPIWrapper = new KontikiAPIWrapper($storageProfile->getStorageUrl());
$playbackResource = $kontikiAPIWrapper->getPlaybackResource(KontikiPlugin::SERVICE_TOKEN_PREFIX . base64_encode($storageProfile->getServiceToken()), $fileSync->getFilePath());
if (!$playbackResource) {
return null;
}
return strval($playbackResource->urn) . ";realmId:" . strval($playbackResource->realmId) . ";realmTicket:" . strval($playbackResource->realmTicket);
}
开发者ID:DBezemer,项目名称:server,代码行数:11,代码来源:DeliveryProfileKontikiHttp.php
示例10: getExternalUrl
public function getExternalUrl($entryId, $format = PlaybackProtocol::HTTP)
{
$storage = StorageProfilePeer::retrieveByPK($this->getDc());
if (!$storage || $storage->getProtocol() == StorageProfile::STORAGE_KALTURA_DC) {
return kDataCenterMgr::getInternalRemoteUrl($this);
}
$urlManager = DeliveryProfilePeer::getRemoteDeliveryByStorageId(DeliveryProfileDynamicAttributes::init($this->getDc(), $entryId, PlaybackProtocol::HTTP, infraRequestUtils::getProtocol()));
if (is_null($urlManager) && infraRequestUtils::getProtocol() != 'http') {
$urlManager = DeliveryProfilePeer::getRemoteDeliveryByStorageId(DeliveryProfileDynamicAttributes::init($this->getDc(), $entryId));
}
if (is_null($urlManager)) {
return null;
}
$url = $urlManager->getFileSyncUrl($this);
$baseUrl = $urlManager->getUrl();
$url = ltrim($url, "/");
if (strpos($url, "://") === false) {
$url = rtrim($baseUrl, "/") . "/" . $url;
}
return $url;
}
开发者ID:DBezemer,项目名称:server,代码行数:21,代码来源:FileSync.php
示例11: doGetFileSyncUrl
protected function doGetFileSyncUrl(FileSync $fileSync)
{
$storage = StorageProfilePeer::retrieveByPK($fileSync->getDc());
if (!$storage) {
return parent::doGetFileSyncUrl($fileSync);
}
$partnerPath = myPartnerUtils::getUrlForPartner($fileSync->getPartnerId(), $fileSync->getPartnerId() * 100);
$objectSubType = $fileSync->getObjectSubType();
if ($fileSync->getObjectType() == FileSyncObjectType::ENTRY && $objectSubType == entry::FILE_SYNC_ENTRY_SUB_TYPE_ISM) {
return $this->doGetServeIsmUrl($fileSync, $partnerPath, $storage);
}
//To Remove - Until the migration process from asset sub type 3 to asset sub type 1 will be completed we need to support both formats
if ($fileSync->getObjectType() == FileSyncObjectType::FLAVOR_ASSET && $objectSubType == flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ISM) {
return $this->doGetServeIsmUrl($fileSync, $partnerPath, $storage);
}
if ($fileSync->getObjectType() == FileSyncObjectType::FLAVOR_ASSET && $objectSubType == flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ASSET) {
$asset = assetPeer::retrieveById($fileSync->getObjectId());
if ($asset->hasTag(assetParams::TAG_ISM_MANIFEST)) {
return $this->doGetServeIsmUrl($fileSync, $partnerPath, $storage);
}
}
return parent::doGetFileSyncUrl($fileSync);
}
开发者ID:DBezemer,项目名称:server,代码行数:23,代码来源:DeliveryProfileAkamaiSilverLight.php
示例12: setDeliveryId
/**
* Parameters
* --------------
*/
function setDeliveryId($partnerId, $storageId, $deliveryIds)
{
// don't add to database if one of the parameters is missing or is an empty string
if (!$partnerId && !$storageId || !$deliveryIds) {
die('Missing parameter');
}
if ($partnerId) {
$partner = PartnerPeer::retrieveByPK($partnerId);
if (!$partner) {
die("No such partner with id [{$partnerId}]." . PHP_EOL);
}
$partner->setDeliveryProfileIds($deliveryIds);
$partner->save();
}
if ($storageId) {
$storage = StorageProfilePeer::retrieveByPK($storageId);
if (!$storageId) {
die("No such storage profile with id [{$storageId}]." . PHP_EOL);
}
$storage->setDeliveryProfileIds($deliveryIds);
$storage->save();
}
}
开发者ID:DBezemer,项目名称:server,代码行数:27,代码来源:setDeliveryProfileIds.php
示例13: attachRemoteStorageResource
/**
* @param IRemoteStorageResource $resource
* @param entry $dbEntry
* @param asset $dbAsset
* @return asset
* @throws KalturaErrors::ORIGINAL_FLAVOR_ASSET_NOT_CREATED
* @throws KalturaErrors::STORAGE_PROFILE_ID_NOT_FOUND
*/
protected function attachRemoteStorageResource(IRemoteStorageResource $resource, entry $dbEntry, asset $dbAsset = null)
{
$resources = $resource->getResources();
$fileExt = $resource->getFileExt();
$dbEntry->setSource(KalturaSourceType::URL);
// TODO - move image handling to media service
if ($dbEntry->getMediaType() == KalturaMediaType::IMAGE) {
$syncKey = $dbEntry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA);
foreach ($resources as $currentResource) {
$storageProfile = StorageProfilePeer::retrieveByPK($currentResource->getStorageProfileId());
$fileSync = kFileSyncUtils::createReadyExternalSyncFileForKey($syncKey, $currentResource->getUrl(), $storageProfile);
}
$dbEntry->setStatus(entryStatus::READY);
$dbEntry->save();
return null;
}
$dbEntry->save();
$isNewAsset = false;
if (!$dbAsset) {
$isNewAsset = true;
$dbAsset = kFlowHelper::createOriginalFlavorAsset($this->getPartnerId(), $dbEntry->getId());
}
if (!$dbAsset) {
KalturaLog::err("Flavor asset not created for entry [" . $dbEntry->getId() . "]");
if ($dbEntry->getStatus() == entryStatus::NO_CONTENT) {
$dbEntry->setStatus(entryStatus::ERROR_CONVERTING);
$dbEntry->save();
}
throw new KalturaAPIException(KalturaErrors::ORIGINAL_FLAVOR_ASSET_NOT_CREATED);
}
$syncKey = $dbAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
foreach ($resources as $currentResource) {
$storageProfile = StorageProfilePeer::retrieveByPK($currentResource->getStorageProfileId());
$fileSync = kFileSyncUtils::createReadyExternalSyncFileForKey($syncKey, $currentResource->getUrl(), $storageProfile);
}
$dbAsset->setFileExt($fileExt);
if ($dbAsset instanceof flavorAsset && !$dbAsset->getIsOriginal()) {
$dbAsset->setStatus(asset::FLAVOR_ASSET_STATUS_READY);
}
$dbAsset->save();
if ($isNewAsset) {
kEventsManager::raiseEvent(new kObjectAddedEvent($dbAsset));
}
kEventsManager::raiseEvent(new kObjectDataChangedEvent($dbAsset));
if ($dbAsset instanceof flavorAsset && !$dbAsset->getIsOriginal()) {
kBusinessPostConvertDL::handleConvertFinished(null, $dbAsset);
}
return $dbAsset;
}
开发者ID:DBezemer,项目名称:server,代码行数:57,代码来源:KalturaEntryService.php
示例14: doGetFileSyncUrl
/**
* @param FileSync $fileSync
* @return string
*/
protected function doGetFileSyncUrl(FileSync $fileSync)
{
$fileSync = kFileSyncUtils::resolve($fileSync);
$storage = StorageProfilePeer::retrieveByPK($fileSync->getDc());
if (!$storage) {
return parent::doGetFileSyncUrl($fileSync);
}
$serverUrl = $storage->getDeliveryIisBaseUrl();
$partnerPath = myPartnerUtils::getUrlForPartner($fileSync->getPartnerId(), $fileSync->getPartnerId() * 100);
if ($this->protocol == StorageProfile::PLAY_FORMAT_APPLE_HTTP && isset($this->params["hd_ios"])) {
$path = $fileSync->getFilePath();
$urlSuffix = str_replace('\\', '/', $path) . "/index_0_av.m3u8";
$urlPrefix = "http://" . $this->params["hd_ios"] . '/i/';
return $urlPrefix . ltrim($urlSuffix, '/');
}
if ($this->protocol == "hdnetworksmil" && isset($this->params["hd_flash"])) {
$path = $fileSync->getFilePath();
$urlSuffix = str_replace('\\', '/', $path);
$urlPrefix = "http://" . $this->params["hd_flash"];
return $urlPrefix . '/' . ltrim($urlSuffix, '/');
}
if ($fileSync->getObjectSubType() != entry::FILE_SYNC_ENTRY_SUB_TYPE_ISM) {
return parent::doGetFileSyncUrl($fileSync);
}
$serverUrl = myPartnerUtils::getIisHost($fileSync->getPartnerId(), "http");
$path = $partnerPath . '/serveIsm/objectId/' . $fileSync->getObjectId() . '_' . $fileSync->getObjectSubType() . '_' . $fileSync->getVersion() . '.' . pathinfo(kFileSyncUtils::resolve($fileSync)->getFilePath(), PATHINFO_EXTENSION) . '/manifest';
$matches = null;
if (preg_match('/(https?:\\/\\/[^\\/]+)(.*)/', $serverUrl, $matches)) {
$path = $matches[2] . $path;
}
$path = str_replace('//', '/', $path);
return $path;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:37,代码来源:kAkamaiUrlManager.php
示例15: validateStorageId
public function validateStorageId($partnerId)
{
if (is_null($this->storageId) || $this->storageId instanceof KalturaNullField) {
return;
}
$storage = StorageProfilePeer::retrieveByPK($this->storageId);
if (!$storage) {
throw new KalturaAPIException(KalturaErrors::SYNDICATION_FEED_INVALID_STORAGE_ID);
}
$partner = PartnerPeer::retrieveByPK($partnerId);
// storage doesn't belong to the partner
if ($storage->getPartnerId() != $partner->getId()) {
throw new KalturaAPIException(KalturaErrors::SYNDICATION_FEED_INVALID_STORAGE_ID);
}
// partner configured to use kaltura data centers only
if ($partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_ONLY) {
throw new KalturaAPIException(KalturaErrors::SYNDICATION_FEED_KALTURA_DC_ONLY);
}
}
开发者ID:DBezemer,项目名称:server,代码行数:19,代码来源:KalturaBaseSyndicationFeed.php
示例16: buildPkeyCriteria
/**
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
* @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(StorageProfilePeer::DATABASE_NAME);
$criteria->add(StorageProfilePeer::ID, $this->id);
if ($this->alreadyInSave && count($this->modifiedColumns) == 2 && $this->isColumnModified(StorageProfilePeer::UPDATED_AT)) {
$theModifiedColumn = null;
foreach ($this->modifiedColumns as $modifiedColumn) {
if ($modifiedColumn != StorageProfilePeer::UPDATED_AT) {
$theModifiedColumn = $modifiedColumn;
}
}
$atomicColumns = StorageProfilePeer::getAtomicColumns();
if (in_array($theModifiedColumn, $atomicColumns)) {
$criteria->add($theModifiedColumn, $this->getByName($theModifiedColumn, BasePeer::TYPE_COLNAME), Criteria::NOT_EQUAL);
}
}
return $criteria;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:26,代码来源:BaseStorageProfile.php
示例17: exportAction
/**
* @action export
* Action for manually exporting an entry
* @param string $entryId
* @param int $storageProfileId
* @throws KalturaErrors::ENTRY_ID_NOT_FOUND
* @throws KalturaErrors::STORAGE_PROFILE_ID_NOT_FOUND
* @return KalturaBaseEntry The exported entry
*/
public function exportAction($entryId, $storageProfileId)
{
$dbEntry = entryPeer::retrieveByPK($entryId);
if (!$dbEntry) {
throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId);
}
$dbStorageProfile = StorageProfilePeer::retrieveByPK($storageProfileId);
if (!$dbStorageProfile) {
throw new KalturaAPIException(KalturaErrors::STORAGE_PROFILE_ID_NOT_FOUND, $storageProfileId);
}
$scope = $dbStorageProfile->getScope();
$scope->setEntryId($entryId);
if (!$dbStorageProfile->fulfillsRules($scope)) {
throw new KalturaAPIException(KalturaErrors::STORAGE_PROFILE_RULES_NOT_FULFILLED, $storageProfileId);
}
try {
kStorageExporter::exportEntry($dbEntry, $dbStorageProfile);
} catch (kCoreException $e) {
if ($e->getCode() == kCoreException::PROFILE_STATUS_DISABLED) {
throw new KalturaAPIException(APIErrors::PROFILE_STATUS_DISABLED, $entryId);
}
}
//TODO: implement export errors
$entry = KalturaEntryFactory::getInstanceByType($dbEntry->getType());
$entry->fromObject($dbEntry, $this->getResponseProfile());
return $entry;
}
开发者ID:AdiTal,项目名称:server,代码行数:36,代码来源:BaseEntryService.php
示例18: dirname
<?php
require_once dirname(__FILE__) . '/../bootstrap.php';
if ($argc < 3) {
echo "Arguments missing.\n\n";
echo "Usage: php exportToNetStorage.php {partner id} {storage profile id} {max number of entries}(optional)\n";
exit;
}
$partnerId = $argv[1];
$storageProfileId = $argv[2];
$maxEntriesToExport = isset($argv[3]) ? $argv[3] : -1;
if (empty($maxEntriesToExport) || $maxEntriesToExport <= 0) {
$maxEntriesToExport = -1;
}
$storageProfile = StorageProfilePeer::retrieveByPK($storageProfileId);
if (!$storageProfile) {
echo "Invalid storage profile id [{$storageProfileId}].\n\n";
echo "Usage: php exportToNetStorage.php {partner id} {storage profile id}\n";
exit;
}
$flavorParamsIds = $storageProfile->getFlavorParamsIds();
KalturaLog::log("flavorParamsIds [{$flavorParamsIds}]");
$flavorParamsArr = null;
if (!is_null($flavorParamsIds) && strlen(trim($flavorParamsIds))) {
$flavorParamsArr = explode(',', $flavorParamsIds);
}
$moreEntries = true;
$maxConcurrentJobs = 20;
$totalExported = 0;
$lastCreatedAt = null;
$processedIds = array();
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:exportToNetStorage.php
示例19: validateStorageId
public function validateStorageId()
{
if (!$this->storageId) {
return true;
}
$storage = StorageProfilePeer::retrieveByPK($this->storageId);
// no storage found
if (!$storage) {
die;
}
$partner = $this->entry->getPartner();
// partner configured to use kaltura data centers only
if ($partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_ONLY) {
die;
}
// storage doesn't belong to the partner
if ($storage->getPartnerId() != $partner->getId()) {
die;
}
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:20,代码来源:playManifestAction.class.php
示例20: 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
注:本文中的StorageProfilePeer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论