Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Identity
      • Log
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Resource
    • LoadBalancer
      • Resource
    • ObjectStore
      • Constants
      • Exception
      • Resource
      • Upload
    • Orchestration
    • Queues
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • Access
  • Algorithm
  • AllowedDomain
  • BillableLoadBalancer
  • ConnectionLogging
  • ConnectionThrottle
  • ContentCaching
  • ErrorPage
  • HealthMonitor
  • LoadBalancer
  • Metadata
  • Node
  • NodeEvent
  • Protocol
  • Readonly
  • SessionPersistence
  • SSLTermination
  • Stats
  • SubResource
  • Usage
  • VirtualIp
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class SubResource

SubResource is an abstract class that handles subresources of a LoadBalancer object; for example, the /loadbalancers/{id}/errorpage. Since most of the subresources are handled in a similar manner, this consolidates the functions.

There are really four pieces of data that define a subresource:

  • $url_resource - the actual name of the url component
  • $json_name - the name of the JSON object holding the data
  • $json_collection_name - if the collection is not simply $json_name . 's', this defines the collectio name.
  • $json_collection_element - if the object in a collection is not anonymous, this defines the name of the element holding the object.

Of these, only the $json_name and $url_resource are required.

OpenCloud\Common\Base
Extended by OpenCloud\Common\PersistentObject
Extended by OpenCloud\LoadBalancer\Resource\SubResource

Direct known subclasses

OpenCloud\LoadBalancer\Resource\Access, OpenCloud\LoadBalancer\Resource\ConnectionLogging, OpenCloud\LoadBalancer\Resource\VirtualIp, OpenCloud\LoadBalancer\Resource\ConnectionThrottle, OpenCloud\LoadBalancer\Resource\ContentCaching, OpenCloud\LoadBalancer\Resource\ErrorPage, OpenCloud\LoadBalancer\Resource\HealthMonitor, OpenCloud\LoadBalancer\Resource\Metadata, OpenCloud\LoadBalancer\Resource\Readonly, OpenCloud\LoadBalancer\Resource\SessionPersistence, OpenCloud\LoadBalancer\Resource\SSLTermination

Indirect known subclasses

OpenCloud\LoadBalancer\Resource\Algorithm, OpenCloud\LoadBalancer\Resource\AllowedDomain, OpenCloud\LoadBalancer\Resource\BillableLoadBalancer, OpenCloud\LoadBalancer\Resource\NodeEvent, OpenCloud\LoadBalancer\Resource\Protocol, OpenCloud\LoadBalancer\Resource\Stats, OpenCloud\LoadBalancer\Resource\Usage
Abstract
Namespace: OpenCloud\LoadBalancer\Resource
Located at OpenCloud/LoadBalancer/Resource/SubResource.php
Methods summary
public
# initialRefresh( )

This method needs attention.

This method needs attention.

CodeCoverageIgnore

protected stdClass;
# createJson( )

returns the JSON document's object for creating the subresource

returns the JSON document's object for creating the subresource

The value $_create_keys should be an array of names of data items that can be used in the creation of the object.

Returns

stdClass;

Throws

CreateError
if not overridden

Overrides

OpenCloud\Common\PersistentObject::createJson()
protected stdClass
# updateJson( mixed $params = array() )

returns the JSON for the update (same as create)

returns the JSON for the update (same as create)

For these subresources, the update JSON is the same as the Create JSON

Returns

stdClass

Throws

UpdateError
if not overridden

Overrides

OpenCloud\Common\PersistentObject::updateJson()
public string
# name( )

returns a (default) name of the object

returns a (default) name of the object

The name is constructed by the object class and the object's ID.

Returns

string

Throws

NameError
if attribute 'name' is not defined

Api

Overrides

OpenCloud\Common\PersistentObject::name()
public
# refresh( mixed $id = null, mixed $url = null )

Refreshes the object from the origin (useful when the server is changing states)

Refreshes the object from the origin (useful when the server is changing states)

Throws

IdRequiredError

Overrides

OpenCloud\Common\PersistentObject::refresh()
Methods inherited from OpenCloud\Common\PersistentObject
__construct(), action(), checkExtension(), create(), createUrl(), delete(), findLink(), getClient(), getMetadata(), getParent(), getService(), getUrl(), id(), jsonCollectionElement(), jsonCollectionName(), jsonName(), noCreate(), noDelete(), noUpdate(), parseResponse(), primaryKeyField(), refreshFromLocationUrl(), region(), resourceName(), setMetadata(), setParent(), setService(), status(), update(), url(), waitFor()
Methods inherited from OpenCloud\Common\Base
__call(), checkJsonError(), generateUuid(), getLogger(), getProperty(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()
Properties inherited from OpenCloud\Common\PersistentObject
$metadata
PHP OpenCloud API API documentation generated by ApiGen 2.8.0