HPCloud-PHP
1.2.0
PHP bindings for HPCloud and OpenStack services.
|
Public Member Functions | |
newFromJSON ($json) | |
__construct ($name, $id) | |
name () | |
Get the name of this instance. | |
id () | |
Get the ID of the instance. | |
createdOn () | |
Get a string expressing the creation time. | |
status () | |
Get the status of this instance. | |
isRunning () | |
Check whether the present instance is running. | |
hostname () | |
Get the hostname. | |
setHostname ($hostname) | |
Set the hostname. | |
username () | |
The username field, if available. | |
setUsername ($username) | |
Set the username. | |
password () | |
The password field, if available. | |
setPassword ($password) | |
Set the password. | |
links () | |
An array of links about this database. | |
dsn ($dbName=NULL, $charset=NULL) | |
Get the DSN to connect to the database instance. |
Protected Attributes | |
$name | |
$id | |
$links | |
$created | |
$status | |
$hostname | |
$username | |
$password |
Definition at line 30 of file InstanceDetails.php.
__construct | ( | $name, | |
$id | |||
) |
Definition at line 68 of file InstanceDetails.php.
References InstanceDetails\$id, $name, and InstanceDetails\name().
createdOn | ( | ) |
Get a string expressing the creation time.
This may only be set during CREATE or DESCRIBE results.
string |
Definition at line 105 of file InstanceDetails.php.
dsn | ( | $dbName = NULL , |
|
$charset = NULL |
|||
) |
Get the DSN to connect to the database instance.
A convenience function for PDO.
string | $dbName | The name of the database to connect to. If none is specified, this will be left off of the DSN. |
string | $charset | This will attempt to set the character set. Not all versions of PHP use this. |
string |
Definition at line 289 of file InstanceDetails.php.
References InstanceDetails\hostname().
hostname | ( | ) |
Get the hostname.
Note that the port is always 3306, the MySQL default. Only the hostname is returned.
This returns the DNS name of the host (or possibly an IP address).
string |
Definition at line 159 of file InstanceDetails.php.
Referenced by InstanceDetails\dsn(), and InstanceDetails\setHostname().
id | ( | ) |
Get the ID of the instance.
string |
Definition at line 91 of file InstanceDetails.php.
isRunning | ( | ) |
Check whether the present instance is running.
This is a convenience function for determining whether a remote instance reports itself to be running. It is equivalent to checking that status() returns 'running'.
boolean |
Definition at line 139 of file InstanceDetails.php.
References InstanceDetails\status().
links | ( | ) |
An array of links about this database.
Format:
At the time of this writing, there is no definition of what URLs may appear here. However, the self
URL us a URL to the present instance's definition.
array |
Definition at line 264 of file InstanceDetails.php.
name | ( | ) |
Get the name of this instance.
string |
Definition at line 80 of file InstanceDetails.php.
References $name.
Referenced by InstanceDetails\__construct().
newFromJSON | ( | $json | ) |
Definition at line 42 of file InstanceDetails.php.
password | ( | ) |
The password field, if available.
This is the password for this instance's MySQL database.
string |
Definition at line 221 of file InstanceDetails.php.
Referenced by InstanceDetails\setPassword().
setHostname | ( | $hostname | ) |
Set the hostname.
string | $hostname | The hostname for this server. |
HPCloud::Services::DBaaS::InstanceDetails |
Definition at line 173 of file InstanceDetails.php.
References InstanceDetails\$hostname, and InstanceDetails\hostname().
setPassword | ( | $password | ) |
Set the password.
string | $password | The password for this server. |
HPCloud::Services::DBaaS::InstanceDetails |
Definition at line 235 of file InstanceDetails.php.
References InstanceDetails\$password, and InstanceDetails\password().
setUsername | ( | $username | ) |
Set the username.
string | $username | The username for this server. |
HPCloud::Services::DBaaS::InstanceDetails |
Definition at line 203 of file InstanceDetails.php.
References InstanceDetails\$username, and InstanceDetails\username().
status | ( | ) |
Get the status of this instance.
This indicates whether or not the service is available, along with other details.
Known status messages:
restarting: Instance has been restarted, and is still coming online.
string |
Definition at line 124 of file InstanceDetails.php.
Referenced by InstanceDetails\isRunning().
username | ( | ) |
The username field, if available.
string |
Definition at line 189 of file InstanceDetails.php.
Referenced by InstanceDetails\setUsername().
|
protected |
Definition at line 35 of file InstanceDetails.php.
|
protected |
Definition at line 37 of file InstanceDetails.php.
Referenced by InstanceDetails\setHostname().
|
protected |
Definition at line 33 of file InstanceDetails.php.
Referenced by InstanceDetails\__construct().
|
protected |
Definition at line 34 of file InstanceDetails.php.
|
protected |
Definition at line 32 of file InstanceDetails.php.
|
protected |
Definition at line 40 of file InstanceDetails.php.
Referenced by InstanceDetails\setPassword().
|
protected |
Definition at line 36 of file InstanceDetails.php.
|
protected |
Definition at line 39 of file InstanceDetails.php.
Referenced by InstanceDetails\setUsername().