Service/Rackspace/Files.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Service
- Subpackage
- Rackspace
\Zend_Service_Rackspace_Files
- Parent(s)
- \Zend_Service_Rackspace_Abstract
Constants
ERROR_CDN_TTL_OUT_OF_RANGE
= 'TTL must be a number in seconds, min is 900 sec and maximum is 1577836800 (50 years)'
ERROR_PARAM_UPDATE_CDN
= 'You must specify at least one the parameters: ttl, cdn_enabled or log_retention'Methods

copyObject(string $container_source, string $obj_source, string $container_dest, string $obj_dest, array $metadata = array(), string $content_type = null) : booleanCopy an object from a container to another
| Name | Type | Description |
|---|---|---|
| $container_source | string | |
| $obj_source | string | |
| $container_dest | string | |
| $obj_dest | string | |
| $metadata | array | |
| $content_type | string |
| Type | Description |
|---|---|
| boolean |

createContainer(string $container, array $metadata = array()) : \Zend_Service_Rackspace_Files_Container | booleanCreate a container
| Name | Type | Description |
|---|---|---|
| $container | string | |
| $metadata | array |
| Type | Description |
|---|---|
| \Zend_Service_Rackspace_Files_Container | boolean |

deleteContainer(\sting $container) : booleanDelete a container (only if it's empty)
| Name | Type | Description |
|---|---|---|
| $container | \sting |
| Type | Description |
|---|---|
| boolean |

deleteObject(string $container, string $object) : booleanDelete an object in a container
| Name | Type | Description |
|---|---|---|
| $container | string | |
| $object | string |
| Type | Description |
|---|---|
| boolean |

enableCdnContainer(string $container, integer $ttl = self::CDN_TTL_MIN) : array | booleanEnable the CDN for a container
| Name | Type | Description |
|---|---|---|
| $container | string | |
| $ttl | integer |
| Type | Description |
|---|---|
| array | boolean |

getCdnContainers(array $options = array()) : array | booleanGet all the CDN containers
| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| array | boolean |

getContainer(string $container) : \Container | booleanGet a container
| Name | Type | Description |
|---|---|---|
| $container | string |
| Type | Description |
|---|---|
| \Container | boolean |

getContainers(array $options = array()) : \Zend_Service_Rackspace_Files_ContainerList | booleanGet all the containers
| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| \Zend_Service_Rackspace_Files_ContainerList | boolean |

getCountObjects() : integerReturn the count of objects contained in all the containers
| Type | Description |
|---|---|
| integer |

getInfoAccount() : array | booleanGet the metadata information of the accounts: - total count containers - size in bytes of all the containers - total objects in all the containers
| Type | Description |
|---|---|
| array | boolean |

getInfoCdnContainer(string $container) : array | booleanGet the information of a Cdn container
| Name | Type | Description |
|---|---|---|
| $container | string |
| Type | Description |
|---|---|
| array | boolean |

getMetadataContainer(string $container) : array | booleanGet the metadata of a container
| Name | Type | Description |
|---|---|---|
| $container | string |
| Type | Description |
|---|---|
| array | boolean |

getMetadataObject(string $container, string $object) : array | booleanGet the metadata of an object
| Name | Type | Description |
|---|---|---|
| $container | string | |
| $object | string |
| Type | Description |
|---|---|
| array | boolean |

getObject(string $container, string $object, array $headers = array()) : \Zend_Service_Rackspace_Files_Object | booleanGet an object in a container
| Name | Type | Description |
|---|---|---|
| $container | string | |
| $object | string | |
| $headers | array |
| Type | Description |
|---|---|
| \Zend_Service_Rackspace_Files_Object | boolean |

getObjects(string $container, array $options = array()) : \Zend_Service_Rackspace_Files_ObjectList | booleanGet all the objects of a container
| Name | Type | Description |
|---|---|---|
| $container | string | |
| $options | array |
| Type | Description |
|---|---|
| \Zend_Service_Rackspace_Files_ObjectList | boolean |

getSizeContainers() : integerReturn the size in bytes of all the containers
| Type | Description |
|---|---|
| integer |

setMetadataObject(string $container, string $object, array $metadata) : booleanSet the metadata of a object in a container The old metadata values are replaced with the new one
| Name | Type | Description |
|---|---|---|
| $container | string | |
| $object | string | |
| $metadata | array |
| Type | Description |
|---|---|
| boolean |

storeObject(string $container, string $object, string $content, array $metadata = array(), string $content_type = null) : booleanStore a file in a container
| Name | Type | Description |
|---|---|---|
| $container | string | |
| $object | string | |
| $content | string | |
| $metadata | array | |
| $content_type | string |
| Type | Description |
|---|---|
| boolean |