Overview
  • Namespace
  • Class

Namespaces

  • OpenCloud
    • Autoscale
      • 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
      • 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
int

Returns


$this
public integer
# getContentLength( )

Returns

integer
public
# setEtag( $etag )

Parameters

$etag

Returns


$this
public null|string
# getEtag( )

Returns

null|string
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 string
# getTemporaryUrl( $expires, $method )

Get a temporary URL for this object.

Get a temporary URL for this object.

Parameters

$expires
time in seconds
$method
method can use this URL? (GET' orPUT')

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()

Magic methods summary

Constants summary

string METADATA_LABEL
# 'Object'

Constants inherited from OpenCloud\ObjectStore\Resource\AbstractResource

GLOBAL_METADATA_PREFIX

API documentation generated by ApiGen