We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65f569d commit 64b99abCopy full SHA for 64b99ab
src/Qiniu/Zone.php
@@ -0,0 +1,35 @@
1
+<?php
2
+namespace Qiniu;
3
+
4
+final Class Zone
5
+{
6
+ const ZONE0 = 0, // Zone 常量, 现在有两个zone可以设置,zone0 & zone1
7
+ ZONE1 = 1;
8
9
+ public $upHost;
10
11
+ public function __construct($upHost) {
12
+ $this->upHost = $upHost;
13
+ }
14
15
+ public static function zone0() {
16
+ return self::zone(self::ZONE0);
17
18
19
+ public static function zone1() {
20
+ return self::zone(self::ZONE1);
21
22
23
+ public static function zone($z) {
24
+ switch ($z) {
25
+ case self::ZONE0:
26
+ return new self('http://up.qiniu.com');
27
+ break;
28
+ case self::ZONE1:
29
+ return new self('http://up-z1.qiniu.com');
30
31
32
+ return;
33
34
+}
35
0 commit comments