Overview

Namespaces

  • None
  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Exceptions
      • Log
      • Request
        • Response
    • Compute
    • Database
    • DNS
    • LoadBalancer
      • Resources
    • ObjectStore
      • Resource
    • Orchestration
    • Volume
  • PHP

Classes

  • AbstractStorageObject
  • CDNContainer
  • Container
  • DataObject
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class Container

A container is a storage compartment for your data and provides a way for you to organize your data. You can think of a container as a folder in Windows® or a directory in UNIX®. The primary difference between a container and these other file system concepts is that containers cannot be nested.

A container can also be CDN-enabled (for public access), in which case you will need to interact with a CDNContainer object instead of this one.

OpenCloud\Common\Base
Extended by OpenCloud\ObjectStore\Resource\AbstractStorageObject
Extended by OpenCloud\ObjectStore\Resource\CDNContainer
Extended by OpenCloud\ObjectStore\Resource\Container
Namespace: OpenCloud\ObjectStore\Resource
Located at OpenCloud/ObjectStore/Resource/Container.php
Methods summary
public
# setCDN( OpenCloud\ObjectStore\Resource\CDNContainer $cdn )

Sets the CDN container.

Sets the CDN container.

Parameters

$cdn
OpenCloud\ObjectStore\Resource\CDNContainer
$cdn
public
# getCDN( )

Returns the CDN container.

Returns the CDN container.

Returns

CDNContainer
public
# CDN( )

Backwards compatability.

Backwards compatability.

public OpenCloud\ObjectStore\Resource\CDNContainer
# enableCDN( integer $ttl = null )

Makes the container public via the CDN

Makes the container public via the CDN

Parameters

$ttl
integer
$TTL the Time-To-Live for the CDN container; if NULL, then the cloud's default value will be used for caching.

Returns

OpenCloud\ObjectStore\Resource\CDNContainer

Throws

CDNNotAvailableError
if CDN services are not available

Api

public
# publishToCDN( mixed $ttl = null )

Backwards compatability.

Backwards compatability.

public
# disableCDN( )

Disables the containers CDN function.

Disables the containers CDN function.

Note that the container will still be available on the CDN until its TTL expires.

Api

public OpenCloud\HttpResponse
# createStaticSite( string $indexHtml )

Creates a static website from the container

Creates a static website from the container

Parameters

$indexHtml
string
$index the index page (starting page) of the website

Returns

OpenCloud\HttpResponse

Link

http://docs.rackspace.com/files/api/v1/cf-devguide/content/Create_Static_Website-dle4000.html

Api

public OpenCloud\HttpResponse
# staticSiteErrorPage( string $name )

Sets the error page(s) for the static website

Sets the error page(s) for the static website

Parameters

$name
string
$name the name of the error page

Returns

OpenCloud\HttpResponse

Link

http://docs.rackspace.com/files/api/v1/cf-devguide/content/Set_Error_Pages_for_Static_Website-dle4005.html

Api

public string
# CDNURL( )

Returns the CDN URL of the container (if enabled)

Returns the CDN URL of the container (if enabled)

The CDNURL() is used to manage the container. Note that it is different from the PublicURL() of the container, which is the publicly-accessible URL on the network.

Returns

string

Api

public
# publicURL( )

Returns the Public URL of the container (on the CDN network)

Returns the Public URL of the container (on the CDN network)

public stdClass
# CDNinfo( mixed $property = null )

Returns the CDN info about the container

Returns the CDN info about the container

Returns

stdClass

Api

public string
# CDNURI( )

Returns the CDN container URI prefix

Returns the CDN container URI prefix

Returns

string

Api

public string
# SSLURI( )

Returns the SSL URI for the container

Returns the SSL URI for the container

Returns

string

Api

public string
# streamingURI( )

Returns the streaming URI for the container

Returns the streaming URI for the container

Returns

string

Api

public string
# iosStreamingURI( )

Returns the IOS streaming URI for the container

Returns the IOS streaming URI for the container

Returns

string

Link

http://docs.rackspace.com/files/api/v1/cf-devguide/content/iOS-Streaming-d1f3725.html

Api

public OpenCloud\Collection
# objectList( array $params = array() )

Creates a Collection of objects in the container

Creates a Collection of objects in the container

Parameters

$params
array
$params associative array of parameter values. * account/tenant - The unique identifier of the account/tenant. * container- The unique identifier of the container. * limit (Optional) - The number limit of results. * marker (Optional) - Value of the marker, that the object names greater in value than are returned. * end_marker (Optional) - Value of the marker, that the object names less in value than are returned. * prefix (Optional) - Value of the prefix, which the returned object names begin with. * format (Optional) - Value of the serialized response format, either json or xml. * delimiter (Optional) - Value of the delimiter, that all the object names nested in the container are returned.

Returns

OpenCloud\Collection

Throws

ObjFetchError

Link

for a list of possible parameter names and values
public OpenCloud\ObjectStore\Resource\DataObject
# dataObject( string $name = null )

Returns a new DataObject associated with this container

Returns a new DataObject associated with this container

Parameters

$name
string
$name if supplied, the name of the object to return

Returns

OpenCloud\ObjectStore\Resource\DataObject
public
# refresh( mixed $id = null, mixed $url = null )

Refreshes, then associates the CDN container

Refreshes, then associates the CDN container

Overrides

OpenCloud\ObjectStore\Resource\CDNContainer::refresh()
Methods inherited from OpenCloud\ObjectStore\Resource\CDNContainer
__construct(), create(), delete(), getService(), isValidName(), primaryKeyField(), update(), url()
Methods inherited from OpenCloud\ObjectStore\Resource\AbstractStorageObject
getMetadata(), jsonCollectionElement(), jsonCollectionName(), jsonName(), metadataHeaders(), name()
Methods inherited from OpenCloud\Common\Base
__set(), checkJsonError(), getHttpRequestObject(), getLogger(), makeQueryString(), populate(), setLogger(), setProperty()
Constants inherited from OpenCloud\ObjectStore\Resource\AbstractStorageObject
ACCOUNT_META_PREFIX, CDNCONTAINER_META_PREFIX, CONTAINER_META_PREFIX, OBJECT_META_PREFIX
Properties inherited from OpenCloud\ObjectStore\Resource\CDNContainer
$bytes, $count, $name
Properties inherited from OpenCloud\ObjectStore\Resource\AbstractStorageObject
$metadata
PHP OpenCloud API API documentation generated by ApiGen 2.8.0