OpenCloud/Database/Database.php

Properties

Description

A database in the Cloud Databases service

Classes

Database

Properties

 
 
No 
No 

Description

This class represents a Database in the Rackspace "Red Dwarf" database-as-a-service product.
It contains common code for error handling as well as service functions that are useful. Because it is an abstract class, it cannot be called directly, and it has no publicly-visible properties.

Methods

Create, CreateJson, Delete, Instance, Service, Update, Url, __construct,

Create( array   $params = array(), ) : \OpenCloud\HttpResponse

Description

Creates a new database

Arguments

Name Type Description Default
$params array

array of attributes to set prior to Create

array()

Return value

Type Description
\OpenCloud\HttpResponse

Tags

Name Description
api

CreateJson(   $params = array(), ) : n/a

Description

Returns the JSON object for creating the database

Arguments

Name Type Description Default
$params n/a array()

Return value

Type Description
n/a n/a

Delete( ) : \OpenCloud\HttpResponseb

Description

Deletes a database

Return value

Type Description
\OpenCloud\HttpResponseb

Tags

Name Description
api

Instance( ) : \OpenCloud\Database\Instance

Description

Returns the Instance of the database

Return value

Type Description
\OpenCloud\Database\Instance

Service( ) : \OpenCloud\DbService

Description

Returns the related service

Return value

Type Description
\OpenCloud\DbService

Update( array   $params = array(), ) : void

Description

Updates an existing database

Arguments

Name Type Description Default
$params array

ignored

array()

Return value

Type Description
void

Tags

Name Description
throws always; updates are not permitted

Url( string   $subresource = '', ) : string

Description

Returns the Url of the Database

Arguments

Name Type Description Default
$subresource string

Not used

''

Return value

Type Description
string

Tags

Name Description
api

__construct( \OpenCloud\Database\Instance   $instance, mixed   $info = null, ) : void

Description

Creates a new database object
Unlike other objects (Servers, DataObjects, etc.), passing a database name to the constructor does *not* pull information from the database. For example, if you pass an ID to the `Server()` constructor, it will attempt to retrieve the information on that server from the service, and will return an error if it is not found. However, the Cloud Databases service does not permit retrieval of information on individual databases (only via Collection), and thus passing in a name via the `$info` parameter only creates an in-memory object that is not necessarily tied to an actual database.

Arguments

Name Type Description Default
$instance \OpenCloud\Database\Instance

the parent DbService\Instance of the database

$info mixed

if an array or object, treated as properties to set; if a string, treated as the database name

null

Return value

Type Description
void

Tags

Name Description
throws if `$info` is not a string, object, or array

Properties

$_instance, $name,

  private  $_instance =




  public  $name =




Documentation was generated by phpDocumentor 2.0.0b6 .

Namespaces

Packages