Overview
  • Namespace
  • Class

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

Classes

  • AbstractContainer
  • AbstractResource
  • Account
  • CDNContainer
  • Container
  • ContainerMetadata
  • DataObject

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

Overrides

OpenCloud\Common\Base::populate
public
# 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


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

Parameters

$container

Returns


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

Returns

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

Parameters

$name
string

Returns


$this
public string
# getName( )

Returns

string
public
# setDirectory( $directory )

Parameters

$directory
bool

Returns


$this
public boolean
# getDirectory( )

Returns

boolean
public boolean
# isDirectory( )

Returns

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

Parameters

$content

Returns


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

Returns

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

Parameters

$contentType

Returns


$this
public null|string
# getContentType( )

Returns

null|string
public
# setContentLength( $contentLength )

Parameters

$contentLength
mixed

Returns


$this
public mixed
# getContentLength( )

Returns

mixed
public
# setEtag( $etag )

Parameters

$etag

Returns


$this
public null|string
# getEtag( )

Returns

null|string
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( $lastModified )
public
# getLastModified( )
public
# primaryKeyField( )
public
# getUrl( $path = null, array $params = array() )
public
# update( $params = array() )
public Guzzle\Http\Message\Response
# copy( string $destination )

Parameters

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

Returns

Guzzle\Http\Message\Response
public
# delete( $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' orPUT')
$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

Throws

OpenCloud\Common\Exceptions\InvalidArgumentError
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
public boolean|Guzzle\Http\Url
# getPublicUrl( string $type = OpenCloud\ObjectStore\Resource\UrlType::CDN )

Parameters

$type

Returns

boolean|Guzzle\Http\Url

Methods inherited from OpenCloud\ObjectStore\Resource\AbstractResource

appendToMetadata(), fromResponse(), getCdnService(), getClient(), getMetadata(), getService(), retrieveMetadata(), saveMetadata(), setMetadata(), stockHeaders(), trimHeaders(), unsetMetadataItem()

Methods inherited from OpenCloud\Common\Base

__call(), checkJsonError(), generateUuid(), getInstance(), getLogger(), hasLogger(), makeResourceIteratorOptions(), setLogger(), stripNamespace(), toCamel(), toUnderscores(), url()

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

API documentation generated by ApiGen