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 AbstractResource

Abstract base class which implements shared functionality of ObjectStore resources. Provides support, for example, for metadata-handling and other features that are common to the ObjectStore components.

OpenCloud\Common\Base
Extended by OpenCloud\ObjectStore\Resource\AbstractResource

Direct known subclasses

OpenCloud\ObjectStore\Resource\AbstractContainer, OpenCloud\ObjectStore\Resource\Account, OpenCloud\ObjectStore\Resource\DataObject

Indirect known subclasses

OpenCloud\ObjectStore\Resource\CDNContainer, OpenCloud\ObjectStore\Resource\Container

Abstract
Namespace: OpenCloud\ObjectStore\Resource
Located at OpenCloud/ObjectStore/Resource/AbstractResource.php

Methods summary

public
# __construct( OpenCloud\Common\Service\ServiceInterface $service )
public Service
# getService( )

For internal use only.

For internal use only.

Returns

Service
The ObjectStore service associated with this ObjectStore resource.
public Service
# getCdnService( )

For internal use only.

For internal use only.

Returns

Service
The CDN version of the ObjectStore service associated with this ObjectStore resource.
public Client
# getClient( )

For internal use only.

For internal use only.

Returns

Client
The HTTP client associated with the associated ObjectStore service.
public static OpenCloud\ObjectStore\Resource\AbstractResource
# fromResponse( Guzzle\Http\Message\Response $response, OpenCloud\Common\Service\ServiceInterface $service )

Factory method that allows for easy instantiation from a Response object.

Factory method that allows for easy instantiation from a Response object.

For internal use only.

Parameters

$response
HTTP response from an API operation.
$service
The ObjectStore service to associate with this ObjectStore resource object.

Returns

OpenCloud\ObjectStore\Resource\AbstractResource
A concrete sub-class of AbstractResource.
public static array
# trimHeaders( array $headers )

Trim headers of their resource-specific prefixes.

Trim headers of their resource-specific prefixes.

For internal use only.

Parameters

$headers
Headers as returned from an HTTP response

Returns

array
Trimmed headers
public static array
# stockHeaders( array $headers )

Prepend/stock the header names with a resource-specific prefix.

Prepend/stock the header names with a resource-specific prefix.

Parameters

$headers
Headers to use on ObjectStore resource.

Returns

array
Headers returned with appropriate prefix as expected by ObjectStore service.
public OpenCloud\ObjectStore\Resource\AbstractResource
# setMetadata( array $data, boolean $constructFromResponse = false )

Set the metadata (local-only) for this object. You must call saveMetadata to actually persist the metadata using the ObjectStore service.

Set the metadata (local-only) for this object. You must call saveMetadata to actually persist the metadata using the ObjectStore service.

Parameters

$data
Object/container metadata key/value pair array.
$constructFromResponse
Whether the metadata key/value pairs were obtiained from an HTTP response of an ObjectStore API operation.

Returns

OpenCloud\ObjectStore\Resource\AbstractResource
This object, with metadata set.
public OpenCloud\Common\Metadata
# getMetadata( )

Returns metadata for this object.

Returns metadata for this object.

Returns

OpenCloud\Common\Metadata
Metadata set on this object.
public Guzzle\Http\Message\Response
# saveMetadata( array $metadata, boolean $stockPrefix = true )

Push local metadata to the API, thereby executing a permanent save.

Push local metadata to the API, thereby executing a permanent save.

Parameters

$metadata
The array of values you want to set as metadata
$stockPrefix

Whether to prepend each array key with the metadata-specific prefix. For objects, this would be X-Object-Meta-Foo => Bar

Returns

Guzzle\Http\Message\Response
HTTP response from API operation.
public OpenCloud\Common\Metadata
# retrieveMetadata( )

Retrieve metadata from the API. This method will then set and return this value.

Retrieve metadata from the API. This method will then set and return this value.

Returns

OpenCloud\Common\Metadata
Metadata returned from the ObjectStore service for this object/container.
public Guzzle\Http\Message\Response
# unsetMetadataItem( $key )

To delete or unset a particular metadata item.

To delete or unset a particular metadata item.

Parameters

$key
key to unset

Returns

Guzzle\Http\Message\Response
HTTP response returned from API operation to unset metadata item.
public array
# appendToMetadata( array $values )

Append a particular array of values to the existing metadata. Analogous to a merge. You must call to actually persist the metadata using the ObjectStore service.

Append a particular array of values to the existing metadata. Analogous to a merge. You must call to actually persist the metadata using the ObjectStore service.

Parameters

$values
The array of values you want to append to metadata.

Returns

array
Metadata, after $values are appended.

Methods inherited from OpenCloud\Common\Base

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

Constants summary

string GLOBAL_METADATA_PREFIX
# 'X'

Constants inherited from OpenCloud\Common\Base

PATCH_CONTENT_TYPE

API documentation generated by ApiGen