Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CDN
      • Resource
    • CloudMonitoring
      • Collection
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Log
      • Resource
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Collection
      • Resource
    • Identity
      • Constants
      • Resource
    • Image
      • Enum
      • Resource
        • JsonPatch
        • Schema
    • LoadBalancer
      • Collection
      • Enum
      • Resource
    • Networking
      • Resource
    • ObjectStore
      • Constants
      • Enum
      • Exception
      • Resource
      • Upload
    • Orchestration
      • Resource
    • Queues
      • Collection
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • AbstractContainer
  • AbstractResource
  • Account
  • CDNContainer
  • Container
  • ContainerMetadata
  • DataObject
  • Overview
  • Namespace
  • Class
  • Tree

Class DataObject

Objects are the basic storage entities in Cloud Files. They represent the files and their optional metadata you upload to the system. When you upload objects to Cloud Files, the data is stored as-is (without compression or encryption) and consists of a location (container), the object's name, and any metadata you assign consisting of key/value pairs.

OpenCloud\Common\Base
Extended by OpenCloud\ObjectStore\Resource\AbstractResource
Extended by OpenCloud\ObjectStore\Resource\DataObject
Namespace: OpenCloud\ObjectStore\Resource
Located at OpenCloud/ObjectStore/Resource/DataObject.php
Methods summary
public
# __construct( OpenCloud\ObjectStore\Resource\Container $container, null $data = null )

Also need to set Container parent and handle pseudo-directories.

Also need to set Container parent and handle pseudo-directories.

Parameters

$container
$data

Overrides

OpenCloud\ObjectStore\Resource\AbstractResource::__construct()
public
# populate( mixed $info, boolean $setObjects = true )

A collection list of DataObjects contains a different data structure than the one returned for the "Retrieve Object" operation. So we need to stock the values differently. Populates the current object based on an unknown data type.

A collection list of DataObjects contains a different data structure than the one returned for the "Retrieve Object" operation. So we need to stock the values differently. Populates the current object based on an unknown data type.

Parameters

$info
$setObjects

Throws

OpenCloud\Common\Exceptions\InvalidArgumentError
Exceptions\InvalidArgumentError

Overrides

OpenCloud\Common\Base::populate()
public mixed
# populateFromResponse( Guzzle\Http\Message\Response $response )

Takes a response and stocks common values from both the body and the headers.

Takes a response and stocks common values from both the body and the headers.

Parameters

$response

Returns

mixed
$this
public
# refresh( )
public mixed
# setContainer( OpenCloud\ObjectStore\Resource\Container $container )

Parameters

$container

Returns

mixed
$this
public OpenCloud\ObjectStore\Resource\Container
# getContainer( )

Returns

OpenCloud\ObjectStore\Resource\Container
Container
public mixed
# setName( mixed $name )

Parameters

$name
string

Returns

mixed
$this
public string
# getName( )

Returns

string
string
public mixed
# setDirectory( mixed $directory )

Parameters

$directory
bool

Returns

mixed
$this
public boolean
# getDirectory( )

Returns

boolean
bool
public boolean
# isDirectory( )

Returns

boolean
Is this data object a pseudo-directory?
public mixed
# setContent( mixed $content )

Parameters

$content

Returns

mixed
$this
public Guzzle\Http\EntityBody
# getContent( )

Returns

Guzzle\Http\EntityBody
EntityBody
public mixed
# setContentType( string $contentType )

Parameters

$contentType

Returns

mixed
$this
public null|string
# getContentType( )

Returns

null|string
null|string
public mixed
# setContentLength( mixed $contentLength )

Parameters

$contentLength
int

Returns

mixed
$this
public integer
# getContentLength( )

Returns

integer
int
public mixed
# setEtag( mixed $etag )

Parameters

$etag

Returns

mixed
$this
public null|string
# getEtag( )

Returns

null|string
null|string
protected mixed
# setManifest( string $manifest )

Parameters

$manifest
Path (`container/object') to set as the value to X-Object-Manifest

Returns

mixed
$this
public null|string
# getManifest( )

Returns

null|string
Path (`container/object') from X-Object-Manifest header or null if the header does not exist
public
# setLastModified( mixed $lastModified )
public
# getLastModified( )
public
# primaryKeyField( )
public
# getUrl( mixed $path = null, array $params = array() )
public
# update( mixed $params = array() )
public Guzzle\Http\Message\Response
# copy( string $destination )

Parameters

$destination
Path (`container/object') of new object

Returns

Guzzle\Http\Message\Response
\Guzzle\Http\Message\Response
public
# delete( mixed $params = array() )
public Guzzle\Http\Message\Response
# createSymlinkTo( string $destination )

Create a symlink to another named object from this object. Requires this object to be empty.

Create a symlink to another named object from this object. Requires this object to be empty.

Parameters

$destination
Path (`container/object') of other object to symlink this object to

Returns

Guzzle\Http\Message\Response
The response

Throws

OpenCloud\Common\Exceptions\NoNameError
if a destination name is not provided
OpenCloud\ObjectStore\Exception\ObjectNotEmptyException
if $this is not an empty object
public OpenCloud\ObjectStore\Resource\DataObject
# createSymlinkFrom( string $source )

Create a symlink to this object from another named object. Requires the other object to either not exist or be empty.

Create a symlink to this object from another named object. Requires the other object to either not exist or be empty.

Parameters

$source
Path (`container/object') of other object to symlink this object from

Returns

OpenCloud\ObjectStore\Resource\DataObject
The symlinked object

Throws

OpenCloud\Common\Exceptions\NoNameError
if a source name is not provided
OpenCloud\ObjectStore\Exception\ObjectNotEmptyException
if object already exists and is not empty
public string
# getTemporaryUrl( integer $expires, string $method, boolean $forcePublicUrl = false )

Get a temporary URL for this object.

Get a temporary URL for this object.

Parameters

$expires
Expiration time in seconds
$method
What method can use this URL? (`GET' or `PUT')
$forcePublicUrl
If set to TRUE, a public URL will always be used. The default is to use whatever URL type the user has set for the main service.

Returns

string
string

Throws

OpenCloud\Common\Exceptions\InvalidArgumentError
\OpenCloud\Common\Exceptions\InvalidArgumentError
OpenCloud\Common\Exceptions\ObjectError
\OpenCloud\Common\Exceptions\ObjectError

Link

http://docs.rackspace.com/files/api/v1/cf-devguide/content/TempURL-d1a4450.html
public mixed
# purge( null $email = null )

Remove this object from the CDN.

Remove this object from the CDN.

Parameters

$email

Returns

mixed
mixed
public boolean|Guzzle\Http\Url
# getPublicUrl( string $type = OpenCloud\ObjectStore\Resource\UrlType::CDN )

Parameters

$type

Returns

boolean|Guzzle\Http\Url
bool|Url
protected static
# headerIsValidMetadata( mixed $header )

Overrides

OpenCloud\ObjectStore\Resource\AbstractResource::headerIsValidMetadata()
protected null|string
# getManifestHeader( )

Returns

null|string
null|string
Methods inherited from OpenCloud\ObjectStore\Resource\AbstractResource
appendToMetadata(), fromResponse(), getCdnService(), getClient(), getMetadata(), getService(), retrieveMetadata(), saveMetadata(), setMetadata(), stockHeaders(), stripPrefix(), trimHeaders(), unsetMetadataItem()
Methods inherited from OpenCloud\Common\Base
__call(), checkJsonError(), generateUuid(), getInstance(), getJsonHeader(), getLogger(), getPatchHeaders(), getProperty(), hasLogger(), makeResourceIteratorOptions(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()
Constants summary
string METADATA_LABEL
#'Object'
Constants inherited from OpenCloud\ObjectStore\Resource\AbstractResource
GLOBAL_METADATA_PREFIX
Constants inherited from OpenCloud\Common\Base
PATCH_CONTENT_TYPE
Properties summary
protected The $name

file name of the object

file name of the object

#
protected Guzzle\Http\EntityBody $content
#
protected boolean $directory

Whether or not this object is a "pseudo-directory"

Whether or not this object is a "pseudo-directory"

Link

http://docs.openstack.org/trunk/openstack-object-storage/developer/content/pseudo-hierarchical-folders-directories.html
#false
protected string $contentType

The object's content type

The object's content type

#
protected The $contentLength

size of this object.

size of this object.

#
protected string $lastModified

Date of last modification.

Date of last modification.

#
protected string $etag

Etag.

Etag.

#
protected string $manifest

Manifest. Can be null so we use false to mean unset.

Manifest. Can be null so we use false to mean unset.

#false
Properties inherited from OpenCloud\ObjectStore\Resource\AbstractResource
$metadata, $metadataClass, $service
Properties inherited from OpenCloud\Common\Base
$aliases
API documentation generated by ApiGen 2.8.0