Service/Rackspace/Files/Object.php

Show: inherited
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 [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

Package: Default

Properties

Propertyprotectedstring $container =

Name of the container where the object is stored

Details
Type
string
Propertyprotectedstring $content =

Object content

Details
Type
string
Propertyprotectedstring $contentType =

Content type of the object's content

Details
Type
string
Propertyprotectedstring $hash =

MD5 value of the object's content

Details
Type
string
Propertyprotectedstring $lastModified =

Date of the last modified of the object

Details
Type
string
Propertyprotectedstring $name =

Name of the object

Details
Type
string
Propertyprotected\Zend_Service_Rackspace_Files $service =

The service that has created the object

Propertyprotectedinteger $size =

Size in bytes of the object's content

Details
Type
integer

Methods

methodpublic__construct(\Zend_Service_Rackspace_Files $service, array $data) : void

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
Name Type Description
$service \Zend_Service_Rackspace_Files
$data array
methodpubliccopyTo(string $container_dest, string $name_dest, array $metadata = array(), string $content_type = null) : boolean

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
Name Type Description
$container_dest string
$name_dest string
$metadata array
$content_type string
Returns
Type Description
boolean
methodpublicgetCdnUrl() : string

Get the CDN URL of the object

Returns
Type Description
string
methodpublicgetCdnUrlSsl() : string

Get the CDN SSL URL of the object

Returns
Type Description
string
methodpublicgetContainer() : string

Get the name of the container

Returns
Type Description
string
methodpublicgetContent() : string

Get the content of the object

Returns
Type Description
string
methodpublicgetContentType() : string

Get the content type of the object's content

Returns
Type Description
string
methodpublicgetHash() : string | boolean

Get the MD5 of the object's content

Returns
Type Description
string | boolean
methodpublicgetLastModified() : string

Get the data of the last modified of the object

Returns
Type Description
string
methodpublicgetMetadata(string $key = null) : string | array | boolean

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

Parameters
Name Type Description
$key string
Returns
Type Description
string | array | boolean
methodpublicgetName() : string

Get name

Returns
Type Description
string
methodpublicgetSize() : integer | boolean

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

Returns
Type Description
integer | boolean
methodpublicsetMetadata(array $metadata) : boolean

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

Parameters
Name Type Description
$metadata array
Returns
Type Description
boolean
Documentation was generated by phpDocumentor 2.0.0a8.