Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit c11f8e1

Browse files
committed
Fixes DocBlocks in Zend_Service_Rackspace_Files
Closes magento#22
1 parent 90f4f15 commit c11f8e1

File tree

1 file changed

+92
-56
lines changed

1 file changed

+92
-56
lines changed

library/Zend/Service/Rackspace/Files.php

Lines changed: 92 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@
2525
require_once 'Zend/Service/Rackspace/Files/Container.php';
2626
require_once 'Zend/Service/Rackspace/Files/Object.php';
2727

28+
/**
29+
* Zend_Service_Rackspace_Files
30+
*
31+
* @category Zend
32+
* @package Zend_Service
33+
* @subpackage Rackspace
34+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
35+
* @license http://framework.zend.com/license/new-bsd New BSD License
36+
*/
2837
class Zend_Service_Rackspace_Files extends Zend_Service_Rackspace_Abstract
2938
{
3039
const ERROR_CONTAINER_NOT_EMPTY = 'The container is not empty, I cannot delete it.';
@@ -70,7 +79,7 @@ class Zend_Service_Rackspace_Files extends Zend_Service_Rackspace_Abstract
7079
/**
7180
* Return the total count of containers
7281
*
73-
* @return integer
82+
* @return int
7483
*/
7584
public function getCountContainers()
7685
{
@@ -80,7 +89,7 @@ public function getCountContainers()
8089
/**
8190
* Return the size in bytes of all the containers
8291
*
83-
* @return integer
92+
* @return int
8493
*/
8594
public function getSizeContainers()
8695
{
@@ -90,7 +99,7 @@ public function getSizeContainers()
9099
/**
91100
* Return the count of objects contained in all the containers
92101
*
93-
* @return integer
102+
* @return int
94103
*/
95104
public function getCountObjects()
96105
{
@@ -100,8 +109,8 @@ public function getCountObjects()
100109
/**
101110
* Get all the containers
102111
*
103-
* @param array $options
104-
* @return Zend_Service_Rackspace_Files_ContainerList|boolean
112+
* @param array $options
113+
* @return Zend_Service_Rackspace_Files_ContainerList|bool
105114
*/
106115
public function getContainers($options=array())
107116
{
@@ -115,7 +124,7 @@ public function getContainers($options=array())
115124
* Get all the CDN containers
116125
*
117126
* @param array $options
118-
* @return array|boolean
127+
* @return array|bool
119128
*/
120129
public function getCdnContainers($options=array())
121130
{
@@ -132,7 +141,7 @@ public function getCdnContainers($options=array())
132141
* - size in bytes of all the containers
133142
* - total objects in all the containers
134143
*
135-
* @return array|boolean
144+
* @return array|bool
136145
*/
137146
public function getInfoAccount()
138147
{
@@ -147,12 +156,16 @@ public function getInfoAccount()
147156
}
148157
return false;
149158
}
159+
150160
/**
151161
* Get all the objects of a container
152162
*
153-
* @param string $container
154-
* @param array $options
155-
* @return Zend_Service_Rackspace_Files_ObjectList|boolean
163+
* Returns a maximum of 10,000 object names.
164+
*
165+
* @param string $container
166+
* @param array $options
167+
* @return bool|Zend_Service_Rackspace_Files_ObjectList
168+
* @throws Zend_Service_Rackspace_Exception
156169
*/
157170
public function getObjects($container,$options=array())
158171
{
@@ -166,12 +179,14 @@ public function getObjects($container,$options=array())
166179
}
167180
return false;
168181
}
182+
169183
/**
170184
* Create a container
171185
*
172-
* @param string $container
173-
* @param array $metadata
174-
* @return Zend_Service_Rackspace_Files_Container|boolean
186+
* @param string $container
187+
* @param array $metadata
188+
* @return bool|Zend_Service_Rackspace_Files_Container
189+
* @throws Zend_Service_Rackspace_Exception
175190
*/
176191
public function createContainer($container,$metadata=array())
177192
{
@@ -203,11 +218,13 @@ public function createContainer($container,$metadata=array())
203218
$this->errorCode= $status;
204219
return false;
205220
}
221+
206222
/**
207223
* Delete a container (only if it's empty)
208224
*
209-
* @param sting $container
210-
* @return boolean
225+
* @param string $container
226+
* @return bool
227+
* @throws Zend_Service_Rackspace_Exception
211228
*/
212229
public function deleteContainer($container)
213230
{
@@ -233,11 +250,13 @@ public function deleteContainer($container)
233250
$this->errorCode= $status;
234251
return false;
235252
}
253+
236254
/**
237255
* Get the metadata of a container
238256
*
239-
* @param string $container
240-
* @return array|boolean
257+
* @param string $container
258+
* @return array|bool
259+
* @throws Zend_Service_Rackspace_Exception
241260
*/
242261
public function getMetadataContainer($container)
243262
{
@@ -279,8 +298,8 @@ public function getMetadataContainer($container)
279298
/**
280299
* Get a container
281300
*
282-
* @param string $container
283-
* @return Container|boolean
301+
* @param string $container
302+
* @return Zend_Service_Rackspace_Files_Container|bool
284303
*/
285304
public function getContainer($container) {
286305
$result= $this->getMetadataContainer($container);
@@ -289,13 +308,15 @@ public function getContainer($container) {
289308
}
290309
return false;
291310
}
311+
292312
/**
293313
* Get an object in a container
294314
*
295-
* @param string $container
296-
* @param string $object
297-
* @param array $headers
298-
* @return Zend_Service_Rackspace_Files_Object|boolean
315+
* @param string $container
316+
* @param string $object
317+
* @param array $headers
318+
* @return bool|Zend_Service_Rackspace_Files_Object
319+
* @throws Zend_Service_Rackspace_Exception
299320
*/
300321
public function getObject($container,$object,$headers=array())
301322
{
@@ -331,16 +352,17 @@ public function getObject($container,$object,$headers=array())
331352
$this->errorCode= $status;
332353
return false;
333354
}
355+
334356
/**
335357
* Store a file in a container
336358
*
337-
* @param string $container
338-
* @param string $object
339-
* @param string $content
340-
* @param array $metadata
341-
* @param string $content_type
342-
*
343-
* @return boolean
359+
* @param string $container
360+
* @param string $object
361+
* @param string $content
362+
* @param array $metadata
363+
* @param string $content_type
364+
* @return bool
365+
* @throws Zend_Service_Rackspace_Exception
344366
*/
345367
public function storeObject($container,$object,$content,$metadata=array(),$content_type=null) {
346368
if (empty($container)) {
@@ -383,12 +405,14 @@ public function storeObject($container,$object,$content,$metadata=array(),$conte
383405
$this->errorCode= $status;
384406
return false;
385407
}
408+
386409
/**
387410
* Delete an object in a container
388411
*
389-
* @param string $container
390-
* @param string $object
391-
* @return boolean
412+
* @param string $container
413+
* @param string $object
414+
* @return bool
415+
* @throws Zend_Service_Rackspace_Exception
392416
*/
393417
public function deleteObject($container,$object) {
394418
if (empty($container)) {
@@ -414,16 +438,18 @@ public function deleteObject($container,$object) {
414438
$this->errorCode= $status;
415439
return false;
416440
}
441+
417442
/**
418443
* Copy an object from a container to another
419444
*
420-
* @param string $container_source
421-
* @param string $obj_source
422-
* @param string $container_dest
423-
* @param string $obj_dest
424-
* @param array $metadata
425-
* @param string $content_type
426-
* @return boolean
445+
* @param string $container_source
446+
* @param string $obj_source
447+
* @param string $container_dest
448+
* @param string $obj_dest
449+
* @param array $metadata
450+
* @param string $content_type
451+
* @return bool
452+
* @throws Zend_Service_Rackspace_Exception
427453
*/
428454
public function copyObject($container_source,$obj_source,$container_dest,$obj_dest,$metadata=array(),$content_type=null) {
429455
if (empty($container_source)) {
@@ -466,12 +492,14 @@ public function copyObject($container_source,$obj_source,$container_dest,$obj_de
466492
$this->errorCode= $status;
467493
return false;
468494
}
495+
469496
/**
470497
* Get the metadata of an object
471498
*
472-
* @param string $container
473-
* @param string $object
474-
* @return array|boolean
499+
* @param string $container
500+
* @param string $object
501+
* @return array|bool
502+
* @throws Zend_Service_Rackspace_Exception
475503
*/
476504
public function getMetadataObject($container,$object) {
477505
if (empty($container)) {
@@ -516,14 +544,16 @@ public function getMetadataObject($container,$object) {
516544
$this->errorCode= $status;
517545
return false;
518546
}
547+
519548
/**
520549
* Set the metadata of a object in a container
521550
* The old metadata values are replaced with the new one
522-
*
523-
* @param string $container
524-
* @param string $object
525-
* @param array $metadata
526-
* @return boolean
551+
*
552+
* @param string $container
553+
* @param string $object
554+
* @param array $metadata
555+
* @return bool
556+
* @throws Zend_Service_Rackspace_Exception
527557
*/
528558
public function setMetadataObject($container,$object,$metadata)
529559
{
@@ -558,12 +588,14 @@ public function setMetadataObject($container,$object,$metadata)
558588
$this->errorCode= $status;
559589
return false;
560590
}
591+
561592
/**
562593
* Enable the CDN for a container
563594
*
564595
* @param string $container
565-
* @param integer $ttl
566-
* @return array|boolean
596+
* @param int $ttl
597+
* @return array|bool
598+
* @throws Zend_Service_Rackspace_Exception
567599
*/
568600
public function enableCdnContainer ($container,$ttl=self::CDN_TTL_MIN) {
569601
if (empty($container)) {
@@ -597,14 +629,16 @@ public function enableCdnContainer ($container,$ttl=self::CDN_TTL_MIN) {
597629
$this->errorCode= $status;
598630
return false;
599631
}
632+
600633
/**
601634
* Update the attribute of a CDN container
602635
*
603636
* @param string $container
604-
* @param integer $ttl
605-
* @param boolean $cdn_enabled
606-
* @param boolean $log
607-
* @return boolean
637+
* @param int $ttl
638+
* @param bool $cdn_enabled
639+
* @param bool $log
640+
* @return bool
641+
* @throws Zend_Service_Rackspace_Exception
608642
*/
609643
public function updateCdnContainer($container,$ttl=null,$cdn_enabled=null,$log=null)
610644
{
@@ -655,11 +689,13 @@ public function updateCdnContainer($container,$ttl=null,$cdn_enabled=null,$log=n
655689
$this->errorCode= $status;
656690
return false;
657691
}
692+
658693
/**
659694
* Get the information of a Cdn container
660695
*
661-
* @param string $container
662-
* @return array|boolean
696+
* @param string $container
697+
* @return array|bool
698+
* @throws Zend_Service_Rackspace_Exception
663699
*/
664700
public function getInfoCdnContainer($container) {
665701
if (empty($container)) {

0 commit comments

Comments
 (0)