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 CDNContainer

A container that has been CDN-enabled. Each CDN-enabled container has a unique Uniform Resource Locator (URL) that can be combined with its object names and openly distributed in web pages, emails, or other applications.

OpenCloud\Common\Base
Extended by OpenCloud\ObjectStore\Resource\AbstractStorageObject
Extended by OpenCloud\ObjectStore\Resource\CDNContainer

Direct known subclasses

OpenCloud\ObjectStore\Resource\Container
Namespace: OpenCloud\ObjectStore\Resource
Located at OpenCloud/ObjectStore/Resource/CDNContainer.php
Methods summary
public
# __construct( OpenCloud\Common\Service $service, mixed $cdata = null )

Creates the container object

Creates the container object

Creates a new container object or, if the $cdata object is a string, retrieves the named container from the object store. If $cdata is an array or an object, then its values are used to set this object.

Parameters

$service
OpenCloud\ObjectStore
$service - the ObjectStore service
$cdata
mixed
$cdata - if supplied, the name of the object

Overrides

OpenCloud\ObjectStore\Resource\AbstractStorageObject::__construct()
public string
# primaryKeyField( )

Allow other objects to know what the primary key is.

Allow other objects to know what the primary key is.

Returns

string
public
# getService( )

Returns the Service associated with the Container

Returns the Service associated with the Container

public string
# url( string $subresource = '' )

Returns the URL of the container

Returns the URL of the container

Parameters

$subresource
string
$subresource not used; required for compatibility

Returns

string

Throws

NoNameError

Overrides

OpenCloud\Common\Base::url()
public boolean
# create( array $params = array() )

Creates a new container with the specified attributes

Creates a new container with the specified attributes

Parameters

$params
array
$params array of parameters

Returns

boolean
TRUE on success; FALSE on failure

Throws

ContainerCreateError
public boolean
# update( )

Updates the metadata for a container

Updates the metadata for a container

Returns

boolean
TRUE on success; FALSE on failure

Throws

ContainerCreateError
public boolean
# delete( )

Deletes the specified container

Deletes the specified container

Returns

boolean
TRUE on success; FALSE on failure

Throws

ContainerDeleteError
public
# refresh( mixed $name = null, mixed $url = null )

Loads the object from the service

Loads the object from the service

public boolean
# isValidName( string $name )

Validates that the container name is acceptable

Validates that the container name is acceptable

Parameters

$name
string
$name the container name to validate

Returns

boolean
TRUE if ok; throws an exception if not

Throws

ContainerNameError
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 summary
public string $name
#

The name of the container.

The name of the container.

The only restrictions on container names is that they cannot contain a forward slash (/) and must be less than 256 bytes in length. Please note that the length restriction applies to the name after it has been URL encoded. For example, a container named Course Docs would be URL encoded as Course%20Docs - which is 13 bytes in length rather than the expected 11.

public integer $count 0
#

Count of how many objects exist in the container.

Count of how many objects exist in the container.

public integer $bytes 0
#

The total bytes used in the container.

The total bytes used in the container.

Properties inherited from OpenCloud\ObjectStore\Resource\AbstractStorageObject
$metadata
PHP OpenCloud API API documentation generated by ApiGen 2.8.0