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

Public Member Functions

 __construct ($service, $data)
 Constructor.
 
 getName ()
 Get name.
 
 getContainer ()
 Get the name of the container.
 
 getHash ()
 Get the MD5 of the object's content.
 
 getSize ()
 Get the size (in bytes) of the object's content.
 
 getContentType ()
 Get the content type of the object's content.
 
 getLastModified ()
 Get the data of the last modified of the object.
 
 getContent ()
 Get the content of the object.
 
 getMetadata ($key=null)
 Get the metadata of the object If you don't pass the $key it returns the entire array of metadata value.
 
 setMetadata ($metadata)
 Set the metadata value The old metadata values are replaced with the new one.
 
 copyTo ($container_dest, $name_dest, $metadata=array(), $content_type=null)
 Copy the object to another container You can add metadata information to the destination object, change the content_type and the name of the object.
 
 getCdnUrl ()
 Get the CDN URL of the object.
 
 getCdnUrlSsl ()
 Get the CDN SSL URL of the object.
 

Protected Attributes

 $service
 
 $name
 
 $hash
 
 $size
 
 $contentType
 
 $lastModified
 
 $content
 
 $container
 

Constructor & Destructor Documentation

__construct (   $service,
  $data 
)

Constructor.

You must pass the Zend_Service_Rackspace_Files object of the caller and an associative array with the keys "name", "container", "hash", "bytes", "content_type", "last_modified", "file" where: name= name of the object container= name of the container where the object is stored hash= the MD5 of the object's content bytes= size in bytes of the object's content content_type= content type of the object's content last_modified= date of the last modified of the object content= content of the object

Parameters
Zend_Service_Rackspace_Files$service
array$data
Exceptions
Zend_Service_Rackspace_Files_Exception

Member Function Documentation

copyTo (   $container_dest,
  $name_dest,
  $metadata = array(),
  $content_type = null 
)

Copy the object to another container You can add metadata information to the destination object, change the content_type and the name of the object.

Parameters
string$container_dest
string$name_dest
array$metadata
string$content_type
Returns
boolean
getCdnUrl ( )

Get the CDN URL of the object.

Returns
string
getCdnUrlSsl ( )

Get the CDN SSL URL of the object.

Returns
string
getContainer ( )

Get the name of the container.

Returns
string
getContent ( )

Get the content of the object.

Returns
string
getContentType ( )

Get the content type of the object's content.

Returns
string
getHash ( )

Get the MD5 of the object's content.

Returns
string|boolean
getLastModified ( )

Get the data of the last modified of the object.

Returns
string
getMetadata (   $key = null)

Get the metadata of the object If you don't pass the $key it returns the entire array of metadata value.

Parameters
string$key
Returns
string|array|boolean
getName ( )

Get name.

Returns
string
getSize ( )

Get the size (in bytes) of the object's content.

Returns
integer|boolean
setMetadata (   $metadata)

Set the metadata value The old metadata values are replaced with the new one.

Parameters
array$metadata
Returns
boolean

Member Data Documentation

$container
protected
$content
protected
$contentType
protected
$hash
protected
$lastModified
protected
$name
protected
$service
protected
$size
protected