Service/Rackspace/Files.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
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

Package: Zend_Service
Parent(s)
\Zend_Service_Rackspace_Abstract

Constants

>VConstant  ERROR_CONTAINER_NOT_EMPTY = 'The container is not empty, I cannot delete it.'
>VConstant  ERROR_CONTAINER_NOT_FOUND = 'The container was not found.'
>VConstant  ERROR_OBJECT_NOT_FOUND = 'The object was not found.'
>VConstant  ERROR_OBJECT_MISSING_PARAM = 'Missing Content-Length or Content-Type header in the request'
>VConstant  ERROR_OBJECT_CHECKSUM = 'Checksum of the file content failed'
>VConstant  ERROR_CONTAINER_EXIST = 'The container already exists'
>VConstant  ERROR_PARAM_NO_NAME_CONTAINER = 'You must specify the container name'
>VConstant  ERROR_PARAM_NO_NAME_OBJECT = 'You must specify the object name'
>VConstant  ERROR_PARAM_NO_CONTENT = 'You must specify the content of the object'
>VConstant  ERROR_PARAM_NO_NAME_SOURCE_CONTAINER = 'You must specify the source container name'
>VConstant  ERROR_PARAM_NO_NAME_SOURCE_OBJECT = 'You must specify the source object name'
>VConstant  ERROR_PARAM_NO_NAME_DEST_CONTAINER = 'You must specify the destination container name'
>VConstant  ERROR_PARAM_NO_NAME_DEST_OBJECT = 'You must specify the destination object name'
>VConstant  ERROR_PARAM_NO_METADATA = 'You must specify the metadata array'
>VConstant  ERROR_CDN_TTL_OUT_OF_RANGE = 'TTL must be a number in seconds, min is 900 sec and maximum is 1577836800 (50 years)'
>VConstant  ERROR_PARAM_UPDATE_CDN = 'You must specify at least one the parameters: ttl, cdn_enabled or log_retention'
>VConstant  HEADER_CONTENT_TYPE = 'Content-Type'
>VConstant  HEADER_HASH = 'Etag'
>VConstant  HEADER_LAST_MODIFIED = 'Last-Modified'
>VConstant  HEADER_CONTENT_LENGTH = 'Content-Length'
>VConstant  HEADER_COPY_FROM = 'X-Copy-From'
>VConstant  METADATA_OBJECT_HEADER = "X-Object-Meta-"
>VConstant  METADATA_CONTAINER_HEADER = "X-Container-Meta-"
>VConstant  CDN_URI = "X-CDN-URI"
>VConstant  CDN_SSL_URI = "X-CDN-SSL-URI"
>VConstant  CDN_ENABLED = "X-CDN-Enabled"
>VConstant  CDN_LOG_RETENTION = "X-Log-Retention"
>VConstant  CDN_ACL_USER_AGENT = "X-User-Agent-ACL"
>VConstant  CDN_ACL_REFERRER = "X-Referrer-ACL"
>VConstant  CDN_TTL = "X-TTL"
>VConstant  CDN_TTL_MIN = 900
>VConstant  CDN_TTL_MAX = 1577836800
>VConstant  CDN_EMAIL = "X-Purge-Email"
>VConstant  ACCOUNT_CONTAINER_COUNT = "X-Account-Container-Count"
>VConstant  ACCOUNT_BYTES_USED = "X-Account-Bytes-Used"
>VConstant  ACCOUNT_OBJ_COUNT = "X-Account-Object-Count"
>VConstant  CONTAINER_OBJ_COUNT = "X-Container-Object-Count"
>VConstant  CONTAINER_BYTES_USE = "X-Container-Bytes-Used"
>VConstant  MANIFEST_OBJECT_HEADER = "X-Object-Manifest"

Methods

methodpubliccopyObject(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

Parameters
NameTypeDescription
$container_sourcestring
$obj_sourcestring
$container_deststring
$obj_deststring
$metadataarray
$content_typestring
Returns
TypeDescription
boolean
methodpubliccreateContainer(string $container, array $metadata = array()) : \Zend_Service_Rackspace_Files_Container | boolean

Create a container

Parameters
NameTypeDescription
$containerstring
$metadataarray
Returns
TypeDescription
\Zend_Service_Rackspace_Files_Container | boolean
methodpublicdeleteContainer(\sting $container) : boolean

Delete a container (only if it's empty)

Parameters
NameTypeDescription
$container\sting
Returns
TypeDescription
boolean
methodpublicdeleteObject(string $container, string $object) : boolean

Delete an object in a container

Parameters
NameTypeDescription
$containerstring
$objectstring
Returns
TypeDescription
boolean
methodpublicenableCdnContainer(string $container, integer $ttl = self::CDN_TTL_MIN) : array | boolean

Enable the CDN for a container

Parameters
NameTypeDescription
$containerstring
$ttlinteger
Returns
TypeDescription
array | boolean
methodpublicgetCdnContainers(array $options = array()) : array | boolean

Get all the CDN containers

Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
array | boolean
methodpublicgetContainer(string $container) : \Container | boolean

Get a container

Parameters
NameTypeDescription
$containerstring
Returns
TypeDescription
\Container | boolean
methodpublicgetContainers(array $options = array()) : \Zend_Service_Rackspace_Files_ContainerList | boolean

Get all the containers

Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
\Zend_Service_Rackspace_Files_ContainerList | boolean
methodpublicgetCountContainers() : integer

Return the total count of containers

Returns
TypeDescription
integer
methodpublicgetCountObjects() : integer

Return the count of objects contained in all the containers

Returns
TypeDescription
integer
methodpublicgetInfoAccount() : 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

Returns
TypeDescription
array | boolean
methodpublicgetInfoCdnContainer(string $container) : array | boolean

Get the information of a Cdn container

Parameters
NameTypeDescription
$containerstring
Returns
TypeDescription
array | boolean
methodpublicgetMetadataContainer(string $container) : array | boolean

Get the metadata of a container

Parameters
NameTypeDescription
$containerstring
Returns
TypeDescription
array | boolean
methodpublicgetMetadataObject(string $container, string $object) : array | boolean

Get the metadata of an object

Parameters
NameTypeDescription
$containerstring
$objectstring
Returns
TypeDescription
array | boolean
methodpublicgetObject(string $container, string $object, array $headers = array()) : \Zend_Service_Rackspace_Files_Object | boolean

Get an object in a container

Parameters
NameTypeDescription
$containerstring
$objectstring
$headersarray
Returns
TypeDescription
\Zend_Service_Rackspace_Files_Object | boolean
methodpublicgetObjects(string $container, array $options = array()) : \Zend_Service_Rackspace_Files_ObjectList | boolean

Get all the objects of a container

Parameters
NameTypeDescription
$containerstring
$optionsarray
Returns
TypeDescription
\Zend_Service_Rackspace_Files_ObjectList | boolean
methodpublicgetSizeContainers() : integer

Return the size in bytes of all the containers

Returns
TypeDescription
integer
methodpublicsetMetadataObject(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

Parameters
NameTypeDescription
$containerstring
$objectstring
$metadataarray
Returns
TypeDescription
boolean
methodpublicstoreObject(string $container, string $object, string $content, array $metadata = array(), string $content_type = null) : boolean

Store a file in a container

Parameters
NameTypeDescription
$containerstring
$objectstring
$contentstring
$metadataarray
$content_typestring
Returns
TypeDescription
boolean
methodpublicupdateCdnContainer(string $container, integer $ttl = null, boolean $cdn_enabled = null, boolean $log = null) : boolean

Update the attribute of a CDN container

Parameters
NameTypeDescription
$containerstring
$ttlinteger
$cdn_enabledboolean
$logboolean
Returns
TypeDescription
boolean
Documentation was generated by phpDocumentor 2.2.0 .