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 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
# getService( )
public
# getCdnService( )
public
# getClient( )
public static static
# 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.

Parameters

$response
$service

Returns

static
public static array
# trimHeaders( $headers )

Trim headers of their resource-specific prefixes.

Trim headers of their resource-specific prefixes.

Parameters

$headers

Returns

array
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

Returns

array
public
# setMetadata( $data, boolean $constructFromResponse = false )

Set the metadata (local-only) for this object.

Set the metadata (local-only) for this object.

Parameters

$data
$constructFromResponse

Returns


$this
public OpenCloud\Common\Metadata
# getMetadata( )

Returns

OpenCloud\Common\Metadata
public mixed
# 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

mixed
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
public mixed
# unsetMetadataItem( $key )

To delete or unset a particular metadata item.

To delete or unset a particular metadata item.

Parameters

$key

Returns

mixed
public array
# appendToMetadata( array $values )

Append a particular array of values to the existing metadata. Analogous to a merge.

Append a particular array of values to the existing metadata. Analogous to a merge.

Parameters

$values

Returns

array

Methods inherited from OpenCloud\Common\Base

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

Magic methods summary

Constants summary

string GLOBAL_METADATA_PREFIX
# 'X'
API documentation generated by ApiGen