1 | <?php |
||
4 | final class Config |
||
5 | { |
||
6 | const SDK_VER = '7.3.0'; |
||
7 | |||
8 | const BLOCK_SIZE = 4194304; //4*1024*1024 分块上传块大小,该参数为接口规格,不能修改 |
||
9 | |||
10 | const RSF_HOST = 'rsf.qiniu.com'; |
||
11 | const API_HOST = 'api.qiniu.com'; |
||
12 | const RS_HOST = 'rs.qiniu.com'; //RS Host |
||
13 | const UC_HOST = 'uc.qbox.me'; //UC Host |
||
14 | const RTCAPI_HOST = 'http://rtc.qiniuapi.com'; |
||
15 | const ARGUS_HOST = 'argus.atlab.ai'; |
||
16 | const CASTER_HOST = 'pili-caster.qiniuapi.com'; |
||
17 | const RTCAPI_VERSION = 'v3'; |
||
18 | |||
19 | // Zone 空间对应的存储区域 |
||
20 | public $region; |
||
21 | //BOOL 是否使用https域名 |
||
22 | public $useHTTPS; |
||
23 | //BOOL 是否使用CDN加速上传域名 |
||
24 | public $useCdnDomains; |
||
25 | // Zone Cache |
||
26 | private $regionCache; |
||
27 | |||
28 | 69 | // 构造函数 |
|
29 | public function __construct(Region $z = null) |
||
36 | 18 | ||
37 | public function getUpHost($accessKey, $bucket) |
||
53 | |||
54 | public function getUpBackupHost($accessKey, $bucket) |
||
70 | |||
71 | public function getRsHost($accessKey, $bucket) |
||
83 | |||
84 | public function getRsfHost($accessKey, $bucket) |
||
96 | 6 | ||
97 | public function getIovipHost($accessKey, $bucket) |
||
109 | |||
110 | public function getApiHost($accessKey, $bucket) |
||
122 | 24 | ||
123 | private function getRegion($accessKey, $bucket) |
||
138 | } |
||
139 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: