@@ -39,7 +39,7 @@ public function buckets($shared = true)
3939 if ($ shared === true ) {
4040 $ includeShared = "true " ;
4141 }
42- return $ this ->getV2 ($ this ->getUcHost (). '/buckets?shared= ' . $ includeShared );
42+ return $ this ->getV2 ($ this ->config -> getUcHost (). '/buckets?shared= ' . $ includeShared );
4343 }
4444
4545 /**
@@ -71,7 +71,7 @@ public function listbuckets(
7171 public function createBucket ($ name , $ region = 'z0 ' )
7272 {
7373 $ path = '/mkbucketv3/ ' . $ name . '/region/ ' . $ region ;
74- return $ this ->postV2 ($ this ->getUcHost () . $ path , null );
74+ return $ this ->postV2 ($ this ->config -> getUcHost () . $ path , null );
7575 }
7676
7777 /**
@@ -85,7 +85,7 @@ public function createBucket($name, $region = 'z0')
8585 public function deleteBucket ($ name )
8686 {
8787 $ path = '/drop/ ' . $ name ;
88- return $ this ->postV2 ($ this ->getUcHost () . $ path , null );
88+ return $ this ->postV2 ($ this ->config -> getUcHost () . $ path , null );
8989 }
9090
9191 /**
@@ -994,15 +994,6 @@ public function setObjectLifecycleWithCond(
994994 return $ this ->rsPost ($ bucket , $ path );
995995 }
996996
997- private function getUcHost ()
998- {
999- $ scheme = "http:// " ;
1000- if ($ this ->config ->useHTTPS === true ) {
1001- $ scheme = "https:// " ;
1002- }
1003- return $ scheme . Config::UC_HOST ;
1004- }
1005-
1006997 private function rsfGet ($ bucket , $ path )
1007998 {
1008999 list ($ host , $ err ) = $ this ->config ->getRsfHostV2 ($ this ->auth ->getAccessKey (), $ bucket );
@@ -1061,13 +1052,13 @@ private function apiPost($bucket, $path, $body = null)
10611052
10621053 private function ucGet ($ path )
10631054 {
1064- $ url = $ this ->getUcHost () . $ path ;
1055+ $ url = $ this ->config -> getUcHost () . $ path ;
10651056 return $ this ->getV2 ($ url );
10661057 }
10671058
10681059 private function ucPost ($ path , $ body = null )
10691060 {
1070- $ url = $ this ->getUcHost () . $ path ;
1061+ $ url = $ this ->config -> getUcHost () . $ path ;
10711062 return $ this ->postV2 ($ url , $ body );
10721063 }
10731064
0 commit comments