Service/Rackspace/Files/Object.php
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 [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Service_Rackspace
- Subpackage
- Files
\Zend_Service_Rackspace_Files_Object
Properties
Methods

__construct(\Zend_Service_Rackspace_Files $service, array $data) : voidConstructor
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
| Name | Type | Description |
|---|---|---|
| $service | \Zend_Service_Rackspace_Files | |
| $data | array |

copyTo(string $container_dest, string $name_dest, array $metadata = array(), string $content_type = null) : booleanCopy the object to another container You can add metadata information to the destination object, change the content_type and the name of the object
| Name | Type | Description |
|---|---|---|
| $container_dest | string | |
| $name_dest | string | |
| $metadata | array | |
| $content_type | string |
| Type | Description |
|---|---|
| boolean |

getContentType() : stringGet the content type of the object's content
| Type | Description |
|---|---|
| string |

getHash() : string | booleanGet the MD5 of the object's content
| Type | Description |
|---|---|
| string | boolean |

getLastModified() : stringGet the data of the last modified of the object
| Type | Description |
|---|---|
| string |

getMetadata(string $key = null) : string | array | booleanGet the metadata of the object If you don't pass the $key it returns the entire array of metadata value
| Name | Type | Description |
|---|---|---|
| $key | string |
| Type | Description |
|---|---|
| string | array | boolean |

getSize() : integer | booleanGet the size (in bytes) of the object's content
| Type | Description |
|---|---|
| integer | boolean |