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) : boolean
Copy 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 | boolean
Create a container
Name | Type | Description |
---|---|---|
$container | string | |
$metadata | array |
Type | Description |
---|---|
\Zend_Service_Rackspace_Files_Container | boolean |


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


deleteObject(string $container, string $object) : boolean
Delete 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 | boolean
Enable the CDN for a container
Name | Type | Description |
---|---|---|
$container | string | |
$ttl | integer |
Type | Description |
---|---|
array | boolean |


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


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


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


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


getInfoAccount() : array | boolean
Get 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 | boolean
Get the information of a Cdn container
Name | Type | Description |
---|---|---|
$container | string |
Type | Description |
---|---|
array | boolean |


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


getMetadataObject(string $container, string $object) : array | boolean
Get 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 | boolean
Get 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 | boolean
Get all the objects of a container
Name | Type | Description |
---|---|---|
$container | string | |
$options | array |
Type | Description |
---|---|
\Zend_Service_Rackspace_Files_ObjectList | boolean |


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


setMetadataObject(string $container, string $object, array $metadata) : boolean
Set 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) : boolean
Store a file in a container
Name | Type | Description |
---|---|---|
$container | string | |
$object | string | |
$content | string | |
$metadata | array | |
$content_type | string |
Type | Description |
---|---|
boolean |