1 | <?php |
||
4 | final class Config |
||
5 | { |
||
6 | const SDK_VER = '7.2.9'; |
||
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 SMS_HOST="https://sms.qiniuapi.com"; |
||
18 | const RTCAPI_VERSION = 'v3'; |
||
19 | const SMS_VERSION='v1'; |
||
20 | |||
21 | // Zone 空间对应的存储区域 |
||
22 | public $region; |
||
23 | //BOOL 是否使用https域名 |
||
24 | public $useHTTPS; |
||
25 | //BOOL 是否使用CDN加速上传域名 |
||
26 | public $useCdnDomains; |
||
27 | // Zone Cache |
||
28 | private $regionCache; |
||
29 | |||
30 | // 构造函数 |
||
31 | 69 | public function __construct(Region $z = null) |
|
38 | |||
39 | 18 | public function getUpHost($accessKey, $bucket) |
|
55 | |||
56 | 3 | public function getUpBackupHost($accessKey, $bucket) |
|
72 | |||
73 | public function getRsHost($accessKey, $bucket) |
||
85 | |||
86 | public function getRsfHost($accessKey, $bucket) |
||
98 | |||
99 | 6 | public function getIovipHost($accessKey, $bucket) |
|
111 | |||
112 | public function getApiHost($accessKey, $bucket) |
||
124 | |||
125 | 24 | private function getRegion($accessKey, $bucket) |
|
140 | } |
||
141 |
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: