1 | <?php |
||
7 | class AliyunOssConfig extends Collection |
||
8 | { |
||
9 | /** |
||
10 | * @return string |
||
11 | */ |
||
12 | 5 | public function getUrlDomain() |
|
19 | |||
20 | /** |
||
21 | * @return string |
||
22 | */ |
||
23 | 4 | protected function getEndpointDomain() |
|
27 | /** |
||
28 | * @return string |
||
29 | */ |
||
30 | 2 | protected function getInternalDomain() |
|
34 | |||
35 | /** |
||
36 | * @return string |
||
37 | */ |
||
38 | 5 | protected function getProtocol() |
|
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | 4 | public function getOssEndpoint() |
|
47 | { |
||
48 | 4 | if ($internal = $this->get('internal')) { |
|
49 | 4 | return $internal; |
|
50 | } |
||
51 | 1 | if ($this->isCName()) { |
|
52 | 1 | return $this->get('domain'); |
|
53 | } |
||
54 | 1 | return $this->get('endpoint'); |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return bool |
||
59 | */ |
||
60 | 4 | protected function isCName() |
|
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | 3 | public function getOssClientParameters() |
|
78 | |||
79 | 2 | public function correctUrl($url) |
|
93 | } |
||
94 |