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

  • ArrayAccess
  • Base
  • Collection
  • Lang
  • Metadata
  • PersistentObject

Class Metadata

The Metadata class represents either Server or Image metadata

OpenCloud\Common\Base
Extended by OpenCloud\Common\Metadata implements Countable

Direct known subclasses

OpenCloud\Compute\Resource\ServerMetadata, OpenCloud\ObjectStore\Resource\ContainerMetadata

Namespace: OpenCloud\Common
Located at OpenCloud/Common/Metadata.php

Methods summary

public
# __set( string $property, string $value )

This setter overrides the base one, since the metadata key can be anything

This setter overrides the base one, since the metadata key can be anything

Parameters

$property
$value
public
# __get( $key )
public boolean
# propertyExists( string $property, boolean $allowRetry = true )

Basic check to see whether property exists.

Basic check to see whether property exists.

Parameters

$property
The property name being investigated.
$allowRetry

If set to TRUE, the check will try to format the name in underscores because there are sometimes discrepancies between camelCaseNames and underscore_names.

Returns

boolean
public mixed
# getProperty( string $property )

Grab value out of the data array.

Grab value out of the data array.

Parameters

$property

Returns

mixed
public mixed
# setProperty( mixed $property, mixed $value )

We can set a property under three conditions:

We can set a property under three conditions:

  1. If it has a concrete setter: setProperty()
  2. If the property exists
  3. If the property name's prefix is in an approved list

Parameters

$property
$value

Returns

mixed
public
# __isset( $property )
public array
# keylist( )

Returns the list of keys defined

Returns the list of keys defined

Returns

array
public
# setArray( array $values, string $prefix = null )

Sets metadata values from an array, with optional prefix

Sets metadata values from an array, with optional prefix

If $prefix is provided, then only array keys that match the prefix are set as metadata values, and $prefix is stripped from the key name.

Parameters

$values
an array of key/value pairs to set
$prefix

if provided, a prefix that is used to identify metadata values. For example, you can set values from headers for a Container by using $prefix='X-Container-Meta-'.

public
# toArray( )
public
# count( )

Implementation of

Countable::count()

Methods inherited from OpenCloud\Common\Base

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

Constants summary

Constants inherited from OpenCloud\Common\Base

PATCH_CONTENT_TYPE

API documentation generated by ApiGen