Service/Rackspace/Files/Object.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 [email protected] 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_Rackspace  
Subpackage
Files  

\Zend_Service_Rackspace_Files_Object

Package: Zend_Service_Rackspace

Properties

>VPropertyprotectedstring $container
Name of the container where the object is stored
Details
Type
string
>VPropertyprotectedstring $content
Object content
Details
Type
string
>VPropertyprotectedstring $contentType
Content type of the object's content
Details
Type
string
>VPropertyprotectedstring $hash
MD5 value of the object's content
Details
Type
string
>VPropertyprotectedstring $lastModified
Date of the last modified of the object
Details
Type
string
>VPropertyprotectedstring $name
Name of the object
Details
Type
string
>VPropertyprotected\Zend_Service_Rackspace_Files $service
The service that has created the object
>VPropertyprotectedinteger $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
NameTypeDescription
$service\Zend_Service_Rackspace_Files
$dataarray
Throws
ExceptionDescription
\Zend_Service_Rackspace_Files_Exception
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
NameTypeDescription
$container_deststring
$name_deststring
$metadataarray
$content_typestring
Returns
TypeDescription
boolean
methodpublicgetCdnUrl() : string

Get the CDN URL of the object

Returns
TypeDescription
string
methodpublicgetCdnUrlSsl() : string

Get the CDN SSL URL of the object

Returns
TypeDescription
string
methodpublicgetContainer() : string

Get the name of the container

Returns
TypeDescription
string
methodpublicgetContent() : string

Get the content of the object

Returns
TypeDescription
string
methodpublicgetContentType() : string

Get the content type of the object's content

Returns
TypeDescription
string
methodpublicgetHash() : string | boolean

Get the MD5 of the object's content

Returns
TypeDescription
string | boolean
methodpublicgetLastModified() : string

Get the data of the last modified of the object

Returns
TypeDescription
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
NameTypeDescription
$keystring
Returns
TypeDescription
string | array | boolean
methodpublicgetName() : string

Get name

Returns
TypeDescription
string
methodpublicgetSize() : integer | boolean

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

Returns
TypeDescription
integer | boolean
methodpublicsetMetadata(array $metadata) : boolean

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

Parameters
NameTypeDescription
$metadataarray
Returns
TypeDescription
boolean
Documentation was generated by phpDocumentor 2.2.0 .