Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Zend_Service_Rackspace_Files_Container Class Reference

Public Member Functions

 __construct ($service, $data)
 Construct.
 
 getName ()
 Get the name of the container.
 
 getSize ()
 Get the size in bytes of the container.
 
 getObjectCount ()
 Get the total count of objects in the container.
 
 isCdnEnabled ()
 Return true if the container is CDN enabled.
 
 getCdnTtl ()
 Get the TTL of the CDN.
 
 isCdnLogEnabled ()
 Return true if the log retention is enabled for the CDN.
 
 getCdnUri ()
 Get the CDN URI.
 
 getCdnUriSsl ()
 Get the CDN URI SSL.
 
 getMetadata ($key=null)
 Get the metadata of the container.
 
 getInfo ()
 Get the information of the container (total of objects, total size)
 
 getObjects ()
 Get all the object of the container.
 
 getObject ($name, $headers=array())
 Get an object of the container.
 
 addObject ($name, $file, $metadata=array())
 Add an object in the container.
 
 deleteObject ($obj)
 Delete an object in the container.
 
 copyObject ($obj_source, $container_dest, $obj_dest, $metadata=array(), $content_type=null)
 Copy an object to another container.
 
 getMetadataObject ($object)
 Get the metadata of an object in the container.
 
 setMetadataObject ($object, $metadata=array())
 Set the metadata of an object in the container.
 
 enableCdn ($ttl=Zend_Service_Rackspace_Files::CDN_TTL_MIN)
 Enable the CDN for the container.
 
 disableCdn ()
 Disable the CDN for the container.
 
 changeTtlCdn ($ttl)
 Change the TTL for the CDN container.
 
 enableLogCdn ()
 Enable the log retention for the CDN.
 
 disableLogCdn ()
 Disable the log retention for the CDN.
 
 getCdnInfo ()
 Get the CDN information.
 

Public Attributes

const ERROR_PARAM_FILE_CONSTRUCT = 'The Zend_Service_Rackspace_Files passed in construction is not valid'
 
const ERROR_PARAM_ARRAY_CONSTRUCT = 'The array passed in construction is not valid'
 
const ERROR_PARAM_NO_NAME = 'The container name is empty'
 

Protected Attributes

 $name
 

Constructor & Destructor Documentation

__construct (   $service,
  $data 
)

Construct.

Parameters
Zend_Service_Rackspace_Files$service
$data
Exceptions
Zend_Service_Rackspace_Files_Exception

Member Function Documentation

addObject (   $name,
  $file,
  $metadata = array() 
)

Add an object in the container.

Parameters
string$name
string$filethe content of the object
array$metadata
Returns
bool
changeTtlCdn (   $ttl)

Change the TTL for the CDN container.

Parameters
integer$ttl
Returns
bool
copyObject (   $obj_source,
  $container_dest,
  $obj_dest,
  $metadata = array(),
  $content_type = null 
)

Copy an object to another container.

Parameters
string$obj_source
string$container_dest
string$obj_dest
array$metadata
string$content_type
Returns
bool
deleteObject (   $obj)

Delete an object in the container.

Parameters
string$obj
Returns
bool
disableCdn ( )

Disable the CDN for the container.

Returns
bool
disableLogCdn ( )

Disable the log retention for the CDN.

Returns
bool

Enable the CDN for the container.

Parameters
integer$ttl
Returns
array|bool
enableLogCdn ( )

Enable the log retention for the CDN.

Returns
bool
getCdnInfo ( )

Get the CDN information.

Returns
array|bool
getCdnTtl ( )

Get the TTL of the CDN.

Returns
integer|bool
getCdnUri ( )

Get the CDN URI.

Returns
string|bool
getCdnUriSsl ( )

Get the CDN URI SSL.

Returns
string|bool
getInfo ( )

Get the information of the container (total of objects, total size)

Returns
array|bool
getMetadata (   $key = null)

Get the metadata of the container.

If $key is empty return the array of metadata

Parameters
string$key
Returns
array|string|bool
getMetadataObject (   $object)

Get the metadata of an object in the container.

Parameters
string$object
Returns
array
getName ( )

Get the name of the container.

Returns
string
getObject (   $name,
  $headers = array() 
)

Get an object of the container.

Parameters
string$name
array$headers
Returns
Zend_Service_Rackspace_Files_Object|bool
getObjectCount ( )

Get the total count of objects in the container.

Returns
integer|bool
getObjects ( )

Get all the object of the container.

Returns
Zend_Service_Rackspace_Files_ObjectList
getSize ( )

Get the size in bytes of the container.

Returns
integer|bool
isCdnEnabled ( )

Return true if the container is CDN enabled.

Returns
bool
isCdnLogEnabled ( )

Return true if the log retention is enabled for the CDN.

Returns
bool
setMetadataObject (   $object,
  $metadata = array() 
)

Set the metadata of an object in the container.

Parameters
string$object
array$metadata
Returns
bool

Member Data Documentation

$name
protected
const ERROR_PARAM_ARRAY_CONSTRUCT = 'The array passed in construction is not valid'
const ERROR_PARAM_FILE_CONSTRUCT = 'The Zend_Service_Rackspace_Files passed in construction is not valid'
const ERROR_PARAM_NO_NAME = 'The container name is empty'