本文整理汇总了PHP中kDataCenterMgr::getInternalRemoteUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP kDataCenterMgr::getInternalRemoteUrl方法的具体用法?PHP kDataCenterMgr::getInternalRemoteUrl怎么用?PHP kDataCenterMgr::getInternalRemoteUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kDataCenterMgr
的用法示例。
在下文中一共展示了kDataCenterMgr::getInternalRemoteUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getExternalUrl
public function getExternalUrl($format = StorageProfile::PLAY_FORMAT_HTTP)
{
$storage = StorageProfilePeer::retrieveByPK($this->getDc());
if (!$storage || $storage->getProtocol() == StorageProfile::STORAGE_KALTURA_DC) {
return kDataCenterMgr::getInternalRemoteUrl($this);
}
$urlManager = kUrlManager::getUrlManagerByStorageProfile($this->getDc());
$url = $urlManager->getFileSyncUrl($this);
if ($format == StorageProfile::PLAY_FORMAT_RTMP) {
return $storage->getDeliveryRmpBaseUrl() . '/' . $url;
}
return $storage->getDeliveryHttpBaseUrl() . '/' . $url;
}
示例2: 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;
}