Completed
Pull Request — master (#277)
by
unknown
12:33
created
src/Qiniu/Storage/BucketManager.php 1 patch
Doc Comments   +29 added lines patch added patch discarded remove patch
@@ -401,30 +401,46 @@  discard block
 block discarded – undo
401 401
         return $scheme . Config::API_HOST;
402 402
     }
403 403
 
404
+    /**
405
+     * @param string $body
406
+     */
404 407
     private function rsPost($path, $body = null)
405 408
     {
406 409
         $url = $this->getRsHost() . $path;
407 410
         return $this->post($url, $body);
408 411
     }
409 412
 
413
+    /**
414
+     * @param string $path
415
+     */
410 416
     private function apiGet($path)
411 417
     {
412 418
         $url = $this->getApiHost() . $path;
413 419
         return $this->get($url);
414 420
     }
415 421
 
422
+    /**
423
+     * @param string $path
424
+     */
416 425
     private function rsGet($path)
417 426
     {
418 427
         $url = $this->getRsHost() . $path;
419 428
         return $this->get($url);
420 429
     }
421 430
 
431
+    /**
432
+     * @param string $path
433
+     * @param string $body
434
+     */
422 435
     private function arPost($path, $body = null)
423 436
     {
424 437
         $url = $this->getArHost() . $path;
425 438
         return $this->pluPost($url, 'POST', $body);
426 439
     }
427 440
 
441
+    /**
442
+     * @param string $url
443
+     */
428 444
     private function get($url)
429 445
     {
430 446
         $headers = $this->auth->authorization($url);
@@ -435,6 +451,9 @@  discard block
 block discarded – undo
435 451
         return array($ret->json(), null);
436 452
     }
437 453
 
454
+    /**
455
+     * @param string $url
456
+     */
438 457
     private function post($url, $body)
439 458
     {
440 459
         $headers = $this->auth->authorization($url, $body, 'application/x-www-form-urlencoded');
@@ -446,6 +465,10 @@  discard block
 block discarded – undo
446 465
         return array($r, null);
447 466
     }
448 467
 
468
+    /**
469
+     * @param string $url
470
+     * @param string $method
471
+     */
449 472
     private function pluPost($url, $method, $body)
450 473
     {
451 474
         $headers = $this->auth->authorizationV2($url, $method, $body, 'application/json');
@@ -515,6 +538,9 @@  discard block
 block discarded – undo
515 538
         return $data;
516 539
     }
517 540
 
541
+    /**
542
+     * @param string $operation
543
+     */
518 544
     private static function oneKeyBatch($operation, $bucket, $keys)
519 545
     {
520 546
         $data = array();
@@ -524,6 +550,9 @@  discard block
 block discarded – undo
524 550
         return $data;
525 551
     }
526 552
 
553
+    /**
554
+     * @param string $operation
555
+     */
527 556
     private static function twoKeyBatch($operation, $source_bucket, $key_pairs, $target_bucket, $force)
528 557
     {
529 558
         if ($target_bucket === null) {
Please login to merge, or discard this patch.