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


PHP Cloudinary::domain_shard方法代码示例

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


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

示例1: unsigned_download_url_prefix

 private static function unsigned_download_url_prefix($source, $cloud_name, $private_cdn, $cdn_subdomain, $secure_cdn_subdomain, $cname, $secure, $secure_distribution)
 {
     $shared_domain = !$private_cdn;
     $prefix = NULL;
     if ($secure) {
         if (empty($secure_distribution) || $secure_distribution == Cloudinary::OLD_AKAMAI_SHARED_CDN) {
             $secure_distribution = $private_cdn ? $cloud_name . '-res.cloudinary.com' : Cloudinary::SHARED_CDN;
         }
         if (empty($shared_domain)) {
             $shared_domain = $secure_distribution == Cloudinary::SHARED_CDN;
         }
         if (is_null($secure_cdn_subdomain) && $shared_domain) {
             $secure_cdn_subdomain = $cdn_subdomain;
         }
         if ($secure_cdn_subdomain) {
             $secure_distribution = str_replace('res.cloudinary.com', "res-" . Cloudinary::domain_shard($source) . ".cloudinary.com", $secure_distribution);
         }
         $prefix = "https://" . $secure_distribution;
     } else {
         if ($cname) {
             $subdomain = $cdn_subdomain ? "a" . Cloudinary::domain_shard($source) . '.' : "";
             $prefix = "http://" . $subdomain . $cname;
         } else {
             $host = implode(array($private_cdn ? $cloud_name . "-" : "", "res", $cdn_subdomain ? "-" . Cloudinary::domain_shard($source) : "", ".cloudinary.com"));
             $prefix = "http://" . $host;
         }
     }
     if ($shared_domain) {
         $prefix = $prefix . '/' . $cloud_name;
     }
     return $prefix;
 }
开发者ID:ShanksGtr,项目名称:AdminerTest,代码行数:32,代码来源:Cloudinary.php


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