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

  • AsyncResponse
  • Domain
  • Object
  • PtrRecord
  • Record
  • Service
  • Subdomain
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class Service

DNS Service.

OpenCloud\Common\Base
Extended by OpenCloud\Common\Service
Extended by OpenCloud\DNS\Service
Namespace: OpenCloud\DNS
Located at OpenCloud/DNS/Service.php
Methods summary
public
# __construct( OpenCloud\OpenStack $connection, string $serviceName, string $serviceRegion, string $urltype )

creates a new DNS object

creates a new DNS object

Parameters

$connection
OpenCloud\OpenStack
$conn connection object
$serviceName
string
$serviceName the name of the service
$serviceRegion
string
$serviceRegion (not currently used; DNS is regionless)
$urltype
string
$urltype the type of URL

Overrides

OpenCloud\Common\Service::__construct()
public DNS\Domain
# domain( mixed $info = null )

returns a DNS::Domain object

returns a DNS::Domain object

Parameters

$info
mixed
$info either the ID, an object, or array of parameters

Returns

DNS\Domain

Api

public OpenCloud\Collection
# domainList( array $filter = array() )

returns a Collection of DNS::Domain objects

returns a Collection of DNS::Domain objects

Parameters

$filter
array
$filter key/value pairs to use as query strings

Returns

OpenCloud\Collection

Api

public OpenCloud\DNS\Record
# ptrRecord( mixed $info = null )

returns a PtrRecord object for a server

returns a PtrRecord object for a server

Parameters

$info
mixed
$info ID, array, or object containing record data

Returns

OpenCloud\DNS\Record
public Collection
# ptrRecordList( OpenCloud\Compute\Server $server )

returns a Collection of PTR records for a given Server

returns a Collection of PTR records for a given Server

Parameters

$server
OpenCloud\Compute\Server
$server the server for which to retrieve the PTR records

Returns

Collection
public OpenCloud\HttpResponse
# request( string $url, string $method = 'GET', array $headers = array(), string $body = null )

performs a HTTP request

performs a HTTP request

This method overrides the request with JSON content type

Parameters

$url
string
$url the URL to target
$method
string
$method the HTTP method to use
$headers
array
$headers key/value pairs for headers to include
$body
string
$body the body of the request (for PUT and POST)

Returns

OpenCloud\HttpResponse

Overrides

OpenCloud\Common\Service::request()
public DNS\AsyncResponse
# asyncRequest( string $url, string $method = 'GET', array $headers = array(), string $body = null )

retrieves an asynchronous response

retrieves an asynchronous response

This method calls the provided $url and expects an asynchronous response. It checks for various HTTP error codes and returns an AsyncResponse object. This object can then be used to poll for the status or to retrieve the final data as needed.

Parameters

$url
string
$url the URL of the request
$method
string
$method the HTTP method to use
$headers
array
$headers key/value pairs for headers to include
$body
string
$body the body of the request (for PUT and POST)

Returns

DNS\AsyncResponse
public DNS\AsyncResponse
# import( string $data )

imports domain records

imports domain records

Note that this function is called from the service (DNS) level, and not (as you might suspect) from the Domain object. Because the function return an AsyncResponse, the domain object will not actually exist until some point after the import has occurred.

Parameters

$data
string
$data the BIND9 formatted data to import

Returns

DNS\AsyncResponse

Api

public array
# limits( mixed $type = null )

returns a list of limits

returns a list of limits

Returns

array
of limits

Overrides

OpenCloud\Common\Service::limits()
public array
# limitTypes( )

returns an array of limit types

returns an array of limit types

Returns

array
public
# simpleRequest( string $url )

Performs a simple request and returns the JSON as an object

Performs a simple request and returns the JSON as an object

Parameters

$url
string
$url the URL to GET
Methods inherited from OpenCloud\Common\Service
collection(), extensions(), getConnection(), getCurrentNamespace(), getResources(), name(), namespaces(), region(), resolveResourceClass(), resource(), resourceList(), setConnection(), url()
Methods inherited from OpenCloud\Common\Base
__set(), checkJsonError(), getHttpRequestObject(), getLogger(), makeQueryString(), populate(), setLogger(), setProperty()
Properties inherited from OpenCloud\Common\Service
$_namespaces, $conn
PHP OpenCloud API API documentation generated by ApiGen 2.8.0