OpenCloud/DNS/Service.php

Properties

Description

The Rackspace Cloud DNS service

Classes

Service

Properties

 
 
No 
No 

Description

This class defines a "service"—a relationship between a specific OpenStack and a provided service, represented by a URL in the service catalog.
Because Service is an abstract class, it cannot be called directly. Provider services such as Rackspace Cloud Servers or OpenStack Swift are each subclassed from Service.

Methods

AsyncRequest, Domain, DomainList, Import, LimitTypes, Limits, PtrRecord, PtrRecordList, Request, SimpleRequest, __construct,

AsyncRequest( string   $url, string   $method = 'GET', array   $headers = array(), string   $body = null, ) : \OpenCloud\DNS\DNS\AsyncResponse

Description

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.

Arguments

Name Type Description Default
$url string

the URL of the request

$method string

the HTTP method to use

'GET'
$headers array

key/value pairs for headers to include

array()
$body string

the body of the request (for PUT and POST)

null

Return value

Type Description
\OpenCloud\DNS\DNS\AsyncResponse

Domain( mixed   $info = null, ) : \OpenCloud\DNS\DNS\Domain

Description

returns a DNS::Domain object

Arguments

Name Type Description Default
$info mixed

either the ID, an object, or array of parameters

null

Return value

Type Description
\OpenCloud\DNS\DNS\Domain

Tags

Name Description
api

DomainList( array   $filter = array(), ) : \OpenCloud\Collection

Description

returns a Collection of DNS::Domain objects

Arguments

Name Type Description Default
$filter array

key/value pairs to use as query strings

array()

Return value

Type Description
\OpenCloud\Collection

Tags

Name Description
api

Import( string   $data, ) : \OpenCloud\DNS\DNS\AsyncResponse

Description

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.

Arguments

Name Type Description Default
$data string

the BIND_9 formatted data to import

Return value

Type Description
\OpenCloud\DNS\DNS\AsyncResponse

Tags

Name Description
api

LimitTypes( ) : array

Description

returns an array of limit types

Return value

Type Description
array

Limits(   $type = null, ) : n/a

Description

returns a list of limits

Arguments

Name Type Description Default
$type n/a null

Return value

Type Description
n/a n/a

PtrRecord( mixed   $info = null, ) : \OpenCloud\DNS\Record

Description

returns a PtrRecord object for a server

Arguments

Name Type Description Default
$info mixed

ID, array, or object containing record data

null

Return value

Type Description
\OpenCloud\DNS\Record

PtrRecordList( \OpenCloud\Compute\Server   $server, ) : \OpenCloud\DNS\Collection

Description

returns a Collection of PTR records for a given Server

Arguments

Name Type Description Default
$server \OpenCloud\Compute\Server

the server for which to retrieve the PTR records

Return value

Type Description
\OpenCloud\DNS\Collection

Request( string   $url, string   $method = 'GET', array   $headers = array(), string   $body = null, ) : \OpenCloud\HttpResponse

Description

performs a HTTP request
This method overrides the request with JSON content type

Arguments

Name Type Description Default
$url string

the URL to target

$method string

the HTTP method to use

'GET'
$headers array

key/value pairs for headers to include

array()
$body string

the body of the request (for PUT and POST)

null

Return value

Type Description
\OpenCloud\HttpResponse

SimpleRequest( string   $url, ) : n/a

Description

performs a simple request and returns the JSON as an object

Arguments

Name Type Description Default
$url string

the URL to GET

Return value

Type Description
n/a n/a

__construct(   $connection, string   $serviceName, string   $serviceRegion, string   $urltype, ) : n/a

Description

creates a new DNS object

Arguments

Name Type Description Default
$connection n/a
$serviceName string

the name of the service

$serviceRegion string

(not currently used; DNS is regionless)

$urltype string

the type of URL

Return value

Type Description
n/a n/a
Documentation was generated by phpDocumentor 2.0.0b6 .

Namespaces

Packages