Location: PHPKode > projects > php-opencloud > php-opencloud-master/docs/api/persistentobject.inc.html
<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="css/black-tie/jquery-ui-1.8.2.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/default.css" type="text/css"></link><script type="text/javascript" src="js/jquery-1.4.2.min.js"></script><script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"></script><script type="text/javascript" src="js/jquery.cookie.js"></script><script type="text/javascript" src="js/jquery.treeview.js"></script></head><body><script type="text/javascript">
          $(document).ready(function()
          {
            $(".filetree").treeview({
              animated: "fast",
              collapsed: true,
              persist: "cookie"
            });
          });

          function jq_escape(myid)
          {
            return '#' + myid.replace(/(#|\$|:|\.|\(|\))/g, '\\$1');
          }

          function applySearchHash()
          {
            hashes = document.location.hash.substr(1, document.location.hash.length);
            if (hashes != "")
            {
              hashes = hashes.split('/');
              $.each(hashes, function(index, hash)
              {
                node = $(jq_escape(hash));
                switch (node[0].nodeName)
                {
                  case 'DIV':
                    tabs = node.parents('.tabs');
                    $(tabs[0]).tabs('select', '#' + hash)
                    break;
                  case 'A':
                    window.scrollTo(0, node.offset().top);
                    break;
                }
              });
            }
          }

          jQuery(function()
          {
            jQuery(".tabs").tabs();
            applySearchHash();
          });
        </script><div id="maincontainer"><div id="header"><h1>
                phpDocumentor
              <img src="images/top-stopper.png"></img></h1></div><ul xmlns="" id="menu">
<li><a href="graph.html">Class diagram</a></li>
<li><a href="markers.html">TODO / Markers</a></li>
<li><a href="parse_markers.html">Errors</a></li>
</ul>
<div id="content_container"><div xmlns="" id="content">
<h1>persistentobject.inc</h1>
<div class="file_menu">
<a href="#includes">Includes</a> |<a href="#classes">Classes</a> |</div>
<div class="properties">
<h1>Properties</h1>
<label class="property-key">author</label><div class="property-value"></div>
<label class="property-key">copyright</label><div class="property-value"></div>
<label class="property-key">package</label><div class="property-value"></div>
<label class="property-key">version</label><div class="property-value"></div>
</div>
<h2>Description</h2>An abstraction that defines persistent objects associated with a service<br><br><a name="includes"></a><h2>Includes</h2>base.inc <span class="nb-faded-text">(Require Once)</span><br>metadata.inc <span class="nb-faded-text">(Require Once)</span><br><a name="classes"></a><h2>Classes</h2>
<div id="PersistentObject" class="class">
<h3>PersistentObject</h3>
<div class="properties">
<h1>Properties</h1>
<label class="property-key">Extends</label><div class="property-value">
<a href="base.inc.html#%5COpenCloud%5CBase">\OpenCloud\Base</a>
         </div>
<label class="property-key">Implements</label><div class="property-value"> 
      </div>
<label class="property-key">author</label><div class="property-value">
<a title="" href="mailto:hide@address.com">Glen Campbell</a>
             
        </div>
<label class="property-key">Abstract</label><div class="property-value">No 
      </div>
<label class="property-key">Final</label><div class="property-value">No 
      </div>
</div>
<h4>Description</h4>
<em>represents an object that has the ability to be
retrieved, created, updated, and deleted.</em><br><p>This class abstracts much of the common functionality between Nova
servers, Swift containers and objects, DBAAS instances, Cinder volumes,
and various other objects that (a) have a URL, (b) can be created, updated,
deleted, or retrieved, and (c) use a standard JSON format with a top-level
element followed by a child object with attributes.</p>

<p>In general, you can create a persistent object class by subclassing this
class and defining some protected, static variables:</p>

<ul>
<li><code>url_resource</code> - the sub-resource value in the URL of the parent. For
example, if the parent URL is <code>http://something/parent</code>, then setting
this value to <code>'another'</code> would result in a URL for the persistent
object of <code>http://something/parent/another</code>.</li>
<li><code>json_name</code> - the top-level JSON object name. For example, if the
persistent object is represented by <code>{"foo": {"attr":value, ...}}</code>, then
set <code>json_name = 'foo'</code>.</li>
<li><code>json_collection_name</code> - optional; this value is the name of a collection
of the persistent objects. If not provided, it defaults to <code>json_name</code>
with an appended <code>'s'</code> (e.g., if <code>json_name</code> is <code>"foo"</code>, then
<code>json_collection_name</code> would be <code>"foos"</code> by default). Set this value if
the collection name doesn't follow this pattern.</li>
<li><code>json_collection_element</code> - the common pattern for a collection is:
<code>{"collection": [{"attr":"value",...}, {"attr":"value",...}, ...]}</code>
That is, each element of the array is an anonymous object containing the
object's attributes. In (very) rare instances, the objects in the array
are named, and <code>json_collection_element</code> contains the name of the
collection objects. For example, in this:
<code>{"allowedDomain":[{"allowedDomain":{"name":"foo"}}]}</code>, then
<code>json_collection_element</code> would be set to <code>'allowedDomain'</code>.</li>
</ul>

<p>The PersistentObject class supports the standard <code>Create()</code>, <code>Update()</code>,
and <code>Delete()</code> methods; if these are not needed (i.e., not supported by
the service, the subclass should redefine these to call the
<code>NoCreate</code>, <code>NoUpdate</code>, or <code>NoDelete</code> methods, which will trigger an
appropriate exception. For example, if an object cannot be created:</p>

<p>function Create($parm=array()) { $this->NoCreate(); }</p>

<p>This will cause any call to the <code>Create()</code> method to fail with an
exception.</p><br><div id="methods_PersistentObject">
<h4>Methods</h4>
<a style="font-style: italic;" href="#PersistentObject::Action()">Action</a>,
      <a style="font-style: italic;" href="#PersistentObject::CheckAttributePrefix()">CheckAttributePrefix</a>,
      <a style="font-style: italic;" href="#PersistentObject::CheckExtension()">CheckExtension</a>,
      <a style="font-style: italic;" href="#PersistentObject::CheckJsonError()">CheckJsonError</a>,
      <a style="font-style: italic;" href="#PersistentObject::Create()">Create</a>,
      <a style="font-style: italic;" href="#PersistentObject::CreateJson()">CreateJson</a>,
      <a style="font-style: italic;" href="#PersistentObject::CreateUrl()">CreateUrl</a>,
      <a style="font-style: italic;" href="#PersistentObject::Delete()">Delete</a>,
      <a style="font-style: italic;" href="#PersistentObject::FindLink()">FindLink</a>,
      <a style="font-style: italic;" href="#PersistentObject::GetHttpRequestObject()">GetHttpRequestObject</a>,
      <a style="font-style: italic;" href="#PersistentObject::Id()">Id</a>,
      <a style="font-style: italic;" href="#PersistentObject::JsonCollectionElement()">JsonCollectionElement</a>,
      <a style="font-style: italic;" href="#PersistentObject::JsonCollectionName()">JsonCollectionName</a>,
      <a style="font-style: italic;" href="#PersistentObject::JsonName()">JsonName</a>,
      <a style="font-style: italic;" href="#PersistentObject::MakeQueryString()">MakeQueryString</a>,
      <a style="font-style: italic;" href="#PersistentObject::Name()">Name</a>,
      <a style="font-style: italic;" href="#PersistentObject::NoCreate()">NoCreate</a>,
      <a style="font-style: italic;" href="#PersistentObject::NoDelete()">NoDelete</a>,
      <a style="font-style: italic;" href="#PersistentObject::NoUpdate()">NoUpdate</a>,
      <a style="font-style: italic;" href="#PersistentObject::Parent()">Parent</a>,
      <a style="font-style: italic;" href="#PersistentObject::PrimaryKeyField()">PrimaryKeyField</a>,
      <a style="font-style: italic;" href="#PersistentObject::Refresh()">Refresh</a>,
      <a style="font-style: italic;" href="#PersistentObject::Region()">Region</a>,
      <a style="font-style: italic;" href="#PersistentObject::ResourceName()">ResourceName</a>,
      <a style="font-style: italic;" href="#PersistentObject::Service()">Service</a>,
      <a style="font-style: italic;" href="#PersistentObject::SetProperty()">SetProperty</a>,
      <a style="font-style: italic;" href="#PersistentObject::Status()">Status</a>,
      <a style="font-style: italic;" href="#PersistentObject::Update()">Update</a>,
      <a style="font-style: italic;" href="#PersistentObject::UpdateJson()">UpdateJson</a>,
      <a style="font-style: italic;" href="#PersistentObject::Url()">Url</a>,
      <a style="font-style: italic;" href="#PersistentObject::WaitFor()">WaitFor</a>,
      <a style="font-style: italic;" href="#PersistentObject::__construct()">__construct</a>,
      <a style="font-style: italic;" href="#PersistentObject::__set()">__set</a>,
      <a style="font-style: italic;" href="#PersistentObject::debug()">debug</a>,
      <a style="font-style: italic;" href="#PersistentObject::to_string()">to_string</a>,
      <div class="method">
<a id="PersistentObject::Action()"></a><h3>Action<span class="nb-faded-text">(
          \OpenCloud\$object
             
            $object,
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Sends the json string to the /action resource</em><br><small><p>This is used for many purposes, such as rebooting the server,
setting the root password, creating images, etc.
Since it can only be used on a live server, it checks for a valid ID.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$object</td>
<td style="white-space: normal;">\OpenCloud\$object</td>
<td><ul>
<li>this will be encoded as json, and we handle all the JSON error-checking in one place</li>
</ul>
</td>
<td></td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>throws</td>
<td>if server ID is not defined</td>
</tr>
<tr>
<td>throws</td>
<td>on other errors</td>
</tr>
<tr>
<td>returns</td>
<td>boolean; TRUE if successful, FALSE otherwise</td>
</tr>
</tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::CheckAttributePrefix()"></a><h3>CheckAttributePrefix<span class="nb-faded-text">(
          string
             
            $property,
          array
             
            $prefixes
            = array(),
          
          )
        </span>
        :
        <span class="nb-faded-text">boolean</span>
</h3>
<h4>Description</h4>
<em>Checks the attribute $property and only permits it if the prefix is
in the specified $prefixes array</em><br><small><p>This is to support extension namespaces in some services.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody>
<tr>
<td>$property</td>
<td style="white-space: normal;">string</td>
<td><p>the name of the attribute</p></td>
<td></td>
</tr>
<tr>
<td>$prefixes</td>
<td style="white-space: normal;">array</td>
<td><p>a list of prefixes</p></td>
<td>array()</td>
</tr>
</tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>boolean</td>
<td>TRUE if valid; FALSE if not</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>inherited_from</td>
<td><a href="base.inc.html#%5COpenCloud%5CBase::CheckAttributePrefix()"><small>\OpenCloud\Base::CheckAttributePrefix()</small></a></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::CheckExtension()"></a><h3>CheckExtension<span class="nb-faded-text">(
          
             
            $alias,
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>checks for `$alias` in extensions and throws an error if not present</em><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$alias</td>
<td style="white-space: normal;">n/a</td>
<td></td>
<td></td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::CheckJsonError()"></a><h3>CheckJsonError<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">boolean</span>
</h3>
<h4>Description</h4>
<em>Checks the most recent JSON operation for errors</em><br><small><p>This function should be called after any <code>json_*()</code> function call.
This ensures that nasty JSON errors are detected and the proper
exception thrown.</p>

<p>Example:
  <code>$obj = json_decode($string);</code>
  <code>if (check_json_error()) do something ...</code></p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>boolean</td>
<td>TRUE if an error occurred, FALSE if none</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>throws</td>
<td></td>
</tr>
<tr>
<td>inherited_from</td>
<td><a href="base.inc.html#%5COpenCloud%5CBase::CheckJsonError()"><small>\OpenCloud\Base::CheckJsonError()</small></a></td>
</tr>
</tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Create()"></a><h3>Create<span class="nb-faded-text">(
          array
             
            $params
            = array(),
          
          )
        </span>
        :
        <span class="nb-faded-text">\OpenCloud\HttpResponse</span>
</h3>
<h4>Description</h4>
<em>Creates a new object</em><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$params</td>
<td style="white-space: normal;">array</td>
<td><p>array of values to set when creating the object</p></td>
<td>array()</td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>\OpenCloud\HttpResponse</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>api</td>
<td></td>
</tr>
<tr>
<td>throws</td>
<td>if HTTP status is not Success</td>
</tr>
</tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::CreateJson()"></a><h3>CreateJson<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Returns an object for the Create() method JSON</em><br><small><p>Must be overridden in a child class.</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td>if not overridden</td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::CreateUrl()"></a><h3>CreateUrl<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>returns the URL used for Create</em><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Delete()"></a><h3>Delete<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">\OpenCloud\HttpResponse</span>
</h3>
<h4>Description</h4>
<em>Deletes an object</em><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>\OpenCloud\HttpResponse</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>api</td>
<td></td>
</tr>
<tr>
<td>throws</td>
<td>if HTTP status is not Success</td>
</tr>
</tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::FindLink()"></a><h3>FindLink<span class="nb-faded-text">(
          string
             
            $type
            = 'self',
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>Since each server can have multiple links, this returns the desired one</em><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$type</td>
<td style="white-space: normal;">string</td>
<td><ul>
<li>'self' is most common; use 'bookmark' for the version-independent one</li>
</ul>
</td>
<td>'self'</td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td>the URL from the links block</td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::GetHttpRequestObject()"></a><h3>GetHttpRequestObject<span class="nb-faded-text">(
          
             
            $url,
          
             
            $method
            = 'GET',
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Returns a class that implements the HttpRequest interface.</em><br><small><p>This can be stubbed out for unit testing and avoid making live calls.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody>
<tr>
<td>$url</td>
<td style="white-space: normal;">n/a</td>
<td></td>
<td></td>
</tr>
<tr>
<td>$method</td>
<td style="white-space: normal;">n/a</td>
<td></td>
<td>'GET'</td>
</tr>
</tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>inherited_from</td>
<td><a href="base.inc.html#%5COpenCloud%5CBase::GetHttpRequestObject()"><small>\OpenCloud\Base::GetHttpRequestObject()</small></a></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Id()"></a><h3>Id<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>returns the object's identifier</em><br><small><p>Can be overridden by a child class if the identifier is not in the
<code>$id</code> property. Use of this function permits the <code>$id</code> attribute to
be protected or private to prevent unauthorized overwriting for
security.</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>api</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::JsonCollectionElement()"></a><h3>JsonCollectionElement<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>returns the JSON name for each element in a collection</em><br><small><p>Usually, elements in a collection are anonymous; this function, however,
provides for an element level name:</p>

<pre><code>`{ "collection" : [ { "element" : ... } ] }`
</code></pre></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::JsonCollectionName()"></a><h3>JsonCollectionName<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>returns the collection JSON element name</em><br><small><p>When an object is returned in a collection, it usually has a top-level
object that is an array holding child objects of the object types.
This static function returns the name of the top-level element. Usually,
that top-level element is simply the JSON name of the resource.'s';
however, it can be overridden by specifying the $json_collection_name
attribute.</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::JsonName()"></a><h3>JsonName<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Returns the top-level document identifier for the returned response
JSON document; must be overridden in child classes</em><br><small><p>For example, a server document is (JSON) <code>{"server": ...}</code> and an
Instance document is <code>{"instance": ...}</code> - this function must return
the top level document name (either "server" or "instance", in
these examples).</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td>if not overridden</td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::MakeQueryString()"></a><h3>MakeQueryString<span class="nb-faded-text">(
          array
             
            $arr,
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>Converts an array of key/value pairs into a single query string</em><br><small><p>For example, array('A'=>1,'B'=>2) would become 'A=1&amp;B=2'.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$arr</td>
<td style="white-space: normal;">array</td>
<td><p>array of key/value pairs</p>
</td>
<td></td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>inherited_from</td>
<td><a href="base.inc.html#%5COpenCloud%5CBase::MakeQueryString()"><small>\OpenCloud\Base::MakeQueryString()</small></a></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Name()"></a><h3>Name<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>Returns the displayable name of the object</em><br><small><p>Can be overridden by child objects; <em>must</em> be overridden by child
objects if the object does not have a <code>name</code> attribute defined.</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>api</td>
<td></td>
</tr>
<tr>
<td>throws</td>
<td>if attribute 'name' is not defined</td>
</tr>
</tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::NoCreate()"></a><h3>NoCreate<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>throws a CreateError for subclasses that don't support Create</em><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::NoDelete()"></a><h3>NoDelete<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>throws a DeleteError for subclasses that don't support Delete</em><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::NoUpdate()"></a><h3>NoUpdate<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>throws a UpdateError for subclasses that don't support Update</em><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Parent()"></a><h3>Parent<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>returns the parent object of this object</em><br><small><p>This is a synonym for Service(), since the object is usually a
service.</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::PrimaryKeyField()"></a><h3>PrimaryKeyField<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>Returns the primary key field for the object</em><br><small><p>The primary key is usually 'id', but this function is provided so that
(in rare cases where it is not 'id'), it can be overridden.</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Refresh()"></a><h3>Refresh<span class="nb-faded-text">(
          
             
            $id
            = NULL,
          
          )
        </span>
        :
        <span class="nb-faded-text">void</span>
</h3>
<h4>Description</h4>
<em>Refreshes the object from the origin (useful when the server is
changing states)</em><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$id</td>
<td style="white-space: normal;">n/a</td>
<td></td>
<td>NULL</td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>void</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Region()"></a><h3>Region<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>returns the region associated with the object</em><br><small><p>navigates to the parent service to determine the region.</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>api</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::ResourceName()"></a><h3>ResourceName<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Returns the resource name for the URL of the object; must be overridden
in child classes</em><br><small><p>For example, a server is <code>/servers/</code>, a database instance is
<code>/instances/</code>. Must be overridden in child classes.</p></small><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Service()"></a><h3>Service<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Returns the Service/parent object associated with this object</em><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::SetProperty()"></a><h3>SetProperty<span class="nb-faded-text">(
          string
             
            $property,
          mixed
             
            $value,
          array
             
            $prefixes
            = array(),
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Sets an extended (unrecognized) property on the current object</em><br><small><p>If RAXSDK_STRICT_PROPERTY_CHECKS is TRUE, then the prefix of the
property name must appear in the $prefixes array, or else an
exception is thrown.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody>
<tr>
<td>$property</td>
<td style="white-space: normal;">string</td>
<td><p>the property name</p></td>
<td></td>
</tr>
<tr>
<td>$value</td>
<td style="white-space: normal;">mixed</td>
<td><p>the value of the property</p></td>
<td></td>
</tr>
<tr>
<td>$prefixes</td>
<td style="white-space: normal;">array</td>
<td><p>optional list of supported prefixes</p></td>
<td>array()</td>
</tr>
</tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>throws</td>
<td>if strict checks are on and the property prefix is not in the list of prefixes.</td>
</tr>
<tr>
<td>inherited_from</td>
<td><a href="base.inc.html#%5COpenCloud%5CBase::SetProperty()"><small>\OpenCloud\Base::SetProperty()</small></a></td>
</tr>
</tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Status()"></a><h3>Status<span class="nb-faded-text">(
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>returns the object's status or `N/A` if not available</em><br><h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>api</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Update()"></a><h3>Update<span class="nb-faded-text">(
          array
             
            $params
            = array(),
          
          )
        </span>
        :
        <span class="nb-faded-text">\OpenCloud\HttpResponse</span>
</h3>
<h4>Description</h4>
<em>Updates an existing object</em><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$params</td>
<td style="white-space: normal;">array</td>
<td><p>array of values to set when updating the object</p></td>
<td>array()</td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>\OpenCloud\HttpResponse</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td>api</td>
<td></td>
</tr>
<tr>
<td>throws</td>
<td>if HTTP status is not Success</td>
</tr>
</tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::UpdateJson()"></a><h3>UpdateJson<span class="nb-faded-text">(
          
             
            $params
            = array(),
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Returns an object for the Update() method JSON</em><br><small><p>Must be overridden in a child class.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$params</td>
<td style="white-space: normal;">n/a</td>
<td></td>
<td>array()</td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td>if not overridden</td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::Url()"></a><h3>Url<span class="nb-faded-text">(
          string
             
            $subresource
            = NULL,
          array
             
            $qstr
            = array(),
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>Returns the default URL of the object</em><br><small><p>This may have to be overridden in subclasses.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody>
<tr>
<td>$subresource</td>
<td style="white-space: normal;">string</td>
<td><p>optional sub-resource string</p>
</td>
<td>NULL</td>
</tr>
<tr>
<td>$qstr</td>
<td style="white-space: normal;">array</td>
<td><p>optional k/v pairs for query strings</p>
</td>
<td>array()</td>
</tr>
</tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td>if URL is not defined</td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::WaitFor()"></a><h3>WaitFor<span class="nb-faded-text">(
          string
             
            $terminal
            = 'ACTIVE',
          integer
             
            $timeout
            = RAXSDK_SERVER_MAXTIMEOUT,
          \OpenCloud\callable
             
            $callback
            = NULL,
          
          )
        </span>
        :
        <span class="nb-faded-text">void</span>
</h3>
<h4>Description</h4>
<em>Waits for the server/instance status to change</em><br><small><p>This function repeatedly polls the system for a change in server
status. Once the status reaches the <code>$terminal</code> value (or 'ERROR'),
then the function returns.</p>

<p>The polling interval is set by the constant RAXSDK_POLL_INTERVAL.</p>

<p>The function will automatically terminate after RAXSDK_SERVER_MAXTIMEOUT
seconds elapse.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody>
<tr>
<td>$terminal</td>
<td style="white-space: normal;">string</td>
<td><p>the terminal state to wait for</p></td>
<td>'ACTIVE'</td>
</tr>
<tr>
<td>$timeout</td>
<td style="white-space: normal;">integer</td>
<td><p>the max time (in seconds) to wait</p>
</td>
<td>RAXSDK_SERVER_MAXTIMEOUT</td>
</tr>
<tr>
<td>$callback</td>
<td style="white-space: normal;">\OpenCloud\callable</td>
<td><p>a callback function that is invoked with each repetition of the polling sequence. This can be used, for example, to update a status display or to permit other operations to continue</p></td>
<td>NULL</td>
</tr>
</tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>void</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>api</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::__construct()"></a><h3>__construct<span class="nb-faded-text">(
          mixed
             
            $parentobj,
          mixed
             
            $info
            = NULL,
          
          )
        </span>
        :
        <span class="nb-faded-text">n/a</span>
</h3>
<h4>Description</h4>
<em>Retrieves the instance from persistent storage</em><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody>
<tr>
<td>$parentobj</td>
<td style="white-space: normal;">mixed</td>
<td><p>the parent object of the current object</p></td>
<td></td>
</tr>
<tr>
<td>$info</td>
<td style="white-space: normal;">mixed</td>
<td><p>the ID or array/object of data</p>
</td>
<td>NULL</td>
</tr>
</tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>n/a</td>
<td>n/a</td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td>if $info has an invalid data type</td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::__set()"></a><h3>__set<span class="nb-faded-text">(
          string
             
            $name,
          mixed
             
            $value,
          
          )
        </span>
        :
        <span class="nb-faded-text">void</span>
</h3>
<h4>Description</h4>
<em>Validates properties that have a namespace: prefix</em><br><small><p>If the property prefix: appears in the list of supported extension
namespaces, then the property is applied to the object. Otherwise,
an exception is thrown.</p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody>
<tr>
<td>$name</td>
<td style="white-space: normal;">string</td>
<td><p>the name of the property</p></td>
<td></td>
</tr>
<tr>
<td>$value</td>
<td style="white-space: normal;">mixed</td>
<td><p>the property's value</p>
</td>
<td></td>
</tr>
</tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>void</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>throws</td>
<td></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::debug()"></a><h3>debug<span class="nb-faded-text">(
          string
             
            $msg,
          mixed
             
            $p1
            = NULL,
          mixed
             
            $p2
            = NULL,
          mixed
             
            $p3
            = NULL,
          mixed
             
            $p4
            = NULL,
          mixed
             
            $p5
            = NULL,
          
          )
        </span>
        :
        <span class="nb-faded-text">void</span>
</h3>
<h4>Description</h4>
<em>Displays a debug message if $RAXSDK_DEBUG is TRUE</em><br><small><p>The primary parameter is a string in sprintf() format, and it can accept
up to five optional parameters. It prints the debug message, prefixed
with "Debug:" and the class name, to the standard output device.</p>

<p>Example:
  <code>$this-&gt;debug('Starting execution of %s', get_class($this))</code></p></small><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody>
<tr>
<td>$msg</td>
<td style="white-space: normal;">string</td>
<td><p>The message string (required); can be in sprintf() format.</p>
</td>
<td></td>
</tr>
<tr>
<td>$p1</td>
<td style="white-space: normal;">mixed</td>
<td><p>Optional argument to be passed to sprintf()</p>
</td>
<td>NULL</td>
</tr>
<tr>
<td>$p2</td>
<td style="white-space: normal;">mixed</td>
<td><p>Optional argument to be passed to sprintf()</p>
</td>
<td>NULL</td>
</tr>
<tr>
<td>$p3</td>
<td style="white-space: normal;">mixed</td>
<td><p>Optional argument to be passed to sprintf()</p>
</td>
<td>NULL</td>
</tr>
<tr>
<td>$p4</td>
<td style="white-space: normal;">mixed</td>
<td><p>Optional argument to be passed to sprintf()</p>
</td>
<td>NULL</td>
</tr>
<tr>
<td>$p5</td>
<td style="white-space: normal;">mixed</td>
<td><p>Optional argument to be passed to sprintf()</p>
</td>
<td>NULL</td>
</tr>
</tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>void</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>inherited_from</td>
<td><a href="base.inc.html#%5COpenCloud%5CBase::debug()"><small>\OpenCloud\Base::debug()</small></a></td>
</tr></tbody>
</table>
</div>
<div class="method">
<a id="PersistentObject::to_string()"></a><h3>to_string<span class="nb-faded-text">(
          mixed
             
            $x,
          
          )
        </span>
        :
        <span class="nb-faded-text">string</span>
</h3>
<h4>Description</h4>
<em>Converts a value to an HTTP-displayable string form</em><br><h4>Arguments</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr></thead>
<tbody><tr>
<td>$x</td>
<td style="white-space: normal;">mixed</td>
<td><p>a value to convert</p></td>
<td></td>
</tr></tbody>
</table>
<h4>Return value</h4>
<table>
<thead><tr>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>string</td>
<td></td>
</tr></tbody>
</table>
<h4>Tags</h4>
<table>
<thead><tr>
<th>Name</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td>inherited_from</td>
<td><a href="base.inc.html#%5COpenCloud%5CBase::to_string()"><small>\OpenCloud\Base::to_string()</small></a></td>
</tr></tbody>
</table>
</div>
</div>
<div id="properties_PersistentObject">
<h4>Properties</h4>
<a href="#PersistentObject::%24_errors">$_errors</a>,
      <a href="#PersistentObject::%24_parent">$_parent</a>,
      <a href="#PersistentObject::%24http_headers">$http_headers</a>,
      <a href="#PersistentObject::%24id">$id</a>,
      <div class="method">
<a id="PersistentObject::$_errors"></a><h3>
<span class="nb-faded-text"> 
          private 
          </span>$_errors
          =
          array()</h3>
<em></em><br>
</div>
<div class="method">
<a id="PersistentObject::$_parent"></a><h3>
<span class="nb-faded-text"> 
          private 
          </span>$_parent
          =
          </h3>
<em></em><br>
</div>
<div class="method">
<a id="PersistentObject::$http_headers"></a><h3>
<span class="nb-faded-text"> 
          private 
          </span>$http_headers
          =
          array()</h3>
<em></em><br>
</div>
<div class="method">
<a id="PersistentObject::$id"></a><h3>
<span class="nb-faded-text"> 
          protected 
          </span>$id
          =
          </h3>
<em></em><br>
</div>
</div>
<div style="clear: both"></div>
</div>
</div>
<small xmlns="" class="footer">Documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor 2.0.0a8</a>.</small></div><div id="index"><div class="padder"><script xmlns="" type="text/javascript">
      $(function() {

        var is_chrome = /chrome/.test( navigator.userAgent.toLowerCase() );
        var is_local = /file:\/\//.test(document.location.href);
        if (is_chrome && is_local)
        {
          // search is disabled on chrome with local files due to http://code.google.com/p/chromium/issues/detail?id=40787
          return;
        }

        $("#search_box").show();
        var search_index = {};
        $.ajax({
          url: "search_index.xml",
          dataType: ($.browser.msie) ? "text" : "xml",
          error: function(data) {
            alert('An error occurred using the search data');
          },
          success: function( data ) {
            var xml;
            if (typeof data == "string") {
              xml = new ActiveXObject("Microsoft.XMLDOM");
              xml.async = false;
              xml.loadXML(data);
            } else {
              xml = data;
            }

            search_index = $("node", xml).map(function() {
              type = $("type", this).text();
              return {
                value: $("value", this).text(),
                label: '<img src="images/icons/'+type+'.png" align="absmiddle">'+$("value", this).text(),
                id: $("id", this).text(),
              };
            }).get();

            $("#search_box").autocomplete({
              source: search_index,
              select: function(event, ui) {
                // redirect to the documentation
                if ((parent) && (parent.content))
                {
                  parent.content.document.location = ''+ui.item.id;
                }
                else
                {
                  jQuery(document).location = ''+ui.item.id;
                }
                applySearchHash();
              }
            });
          }
        });
      });
    </script><input id="search_box"></input><div class="section">
<h1>Namespaces</h1>
<ul id="namespaces-" class="filetree">
<li class="closed">
<span class="folder">OpenCloud</span><ul>
<li><span class="class"><a href="exceptions.inc.html#AttributeError">AttributeError</a><br><small>General Exceptions</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#AuthenticationError">AuthenticationError</a><br><small></small></span></li>
<li><span class="class"><a href="base.inc.html#Base">Base</a><br><small>The Base class is the root class for all other objects used or defined by
this SDK.</small></span></li>
<li><span class="class"><a href="http.inc.html#BlankResponse">BlankResponse</a><br><small>This is a stubbed-out variant of HttpResponse for unit testing</small></span></li>
<li><span class="class"><a href="collection.inc.html#Collection">Collection</a><br><small>Provides an abstraction for working with ordered sets of objects</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#CollectionError">CollectionError</a><br><small></small></span></li>
<li><span class="class"><a href="compute.inc.html#Compute">Compute</a><br><small>The Compute class represents the OpenStack Nova service.</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#CreateError">CreateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#CredentialError">CredentialError</a><br><small></small></span></li>
<li><span class="class"><a href="http.inc.html#CurlRequest">CurlRequest</a><br><small>The CurlRequest class is a simple wrapper to CURL functions.</small></span></li>
<li><span class="class"><a href="dbservice.inc.html#DbService">DbService</a><br><small>The Rackspace Database As A Service (aka "Red Dwarf")</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DeleteError">DeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DocumentError">DocumentError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DomainError">DomainError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#EmptyResponseError">EmptyResponseError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#EndpointError">EndpointError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#HttpError">HttpError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#HttpForbiddenError">HttpForbiddenError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#HttpOverLimitError">HttpOverLimitError</a><br><small></small></span></li>
<li><span class="interface"><a href="http.inc.html#HttpRequest">HttpRequest</a><br><small>The HttpRequest interface defines methods for wrapping CURL; this allows
those methods to be stubbed out for unit testing, thus allowing us to
test without actually making live calls.</small></span></li>
<li><span class="class"><a href="http.inc.html#HttpResponse">HttpResponse</a><br><small>The HttpResponse returns an object with status information, separated
headers, and any response body necessary.</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#HttpRetryError">HttpRetryError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#HttpTimeoutError">HttpTimeoutError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#HttpUnauthorizedError">HttpUnauthorizedError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#HttpUrlError">HttpUrlError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#IdRequiredError">IdRequiredError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InstanceNotFound">InstanceNotFound</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#JsonError">JsonError</a><br><small></small></span></li>
<li><span class="class"><a href="lbservice.inc.html#LoadBalancerService">LoadBalancerService</a><br><small>The Rackspace Cloud Load Balancers</small></span></li>
<li><span class="class"><a href="metadata.inc.html#Metadata">Metadata</a><br><small>The Metadata class represents either Server or Image metadata</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#NameError">NameError</a><br><small></small></span></li>
<li><span class="class"><a href="nova.inc.html#Nova">Nova</a><br><small>Nova is an abstraction layer for the OpenStack compute service.</small></span></li>
<li><span class="class"><a href="objectstore.inc.html#ObjectStore">ObjectStore</a><br><small>ObjectStore - this defines the object-store (Cloud Files) service.</small></span></li>
<li><span class="class"><a href="objectstore.inc.html#ObjectStoreBase">ObjectStoreBase</a><br><small>A base class for common code shared between the ObjectStore and ObjectStoreCDN
objects</small></span></li>
<li><span class="class"><a href="objectstore.inc.html#ObjectStoreCDN">ObjectStoreCDN</a><br><small>This is the CDN related to the ObjectStore</small></span></li>
<li><span class="class"><a href="openstack.inc.html#OpenStack">OpenStack</a><br><small>The OpenStack class represents a relationship (or "connection")
between a user and a service.</small></span></li>
<li><span class="class"><a href="persistentobject.inc.html#PersistentObject">PersistentObject</a><br><small>represents an object that has the ability to be
retrieved, created, updated, and deleted.</small></span></li>
<li><span class="class"><a href="rackspace.inc.html#Rackspace">Rackspace</a><br><small>Rackspace extends the OpenStack class with support for Rackspace&#39;s
API key and tenant requirements.</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ServerActionError">ServerActionError</a><br><small></small></span></li>
<li><span class="class"><a href="service.inc.html#Service">Service</a><br><small>This class defines a "service"—a relationship between a specific OpenStack
and a provided service, represented by a URL in the service catalog.</small></span></li>
<li><span class="class"><a href="openstack.inc.html#ServiceCatalogItem">ServiceCatalogItem</a><br><small>Holds information on a single service from the Service Catalog</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ServiceValueError">ServiceValueError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UnknownError">UnknownError</a><br><small>catch-all</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UnrecognizedServiceError">UnrecognizedServiceError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UnsupportedExtensionError">UnsupportedExtensionError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UpdateError">UpdateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UrlError">UrlError</a><br><small></small></span></li>
<li><span class="class"><a href="volumeservice.inc.html#VolumeService">VolumeService</a><br><small>Nova is an abstraction layer for the OpenStack compute service.</small></span></li>
<li class="closed">
<span class="folder">Compute</span><ul>
<li><span class="class"><a href="flavor.inc.html#Flavor">Flavor</a><br><small>The Flavor class represents a flavor defined by the Compute service</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#FlavorError">FlavorError</a><br><small></small></span></li>
<li><span class="class"><a href="image.inc.html#Image">Image</a><br><small>The Image class represents a stored machine image returned by the
Compute service.</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ImageError">ImageError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InvalidArgumentError">InvalidArgumentError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InvalidIpTypeError">InvalidIpTypeError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InvalidParameterError">InvalidParameterError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InvalidRequestError">InvalidRequestError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MetadataCreateError">MetadataCreateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MetadataDeleteError">MetadataDeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MetadataError">MetadataError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MetadataJsonError">MetadataJsonError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MetadataKeyError">MetadataKeyError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MetadataUpdateError">MetadataUpdateError</a><br><small></small></span></li>
<li><span class="class"><a href="network.inc.html#Network">Network</a><br><small>The Network class represents a single virtual network</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#NetworkCreateError">NetworkCreateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#NetworkDeleteError">NetworkDeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#NetworkError">NetworkError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#NetworkUpdateError">NetworkUpdateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#NetworkUrlError">NetworkUrlError</a><br><small></small></span></li>
<li><span class="class"><a href="server.inc.html#Server">Server</a><br><small>The Server class represents a single server node.</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ServerCreateError">ServerCreateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ServerDeleteError">ServerDeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ServerIpsError">ServerIpsError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ServerJsonError">ServerJsonError</a><br><small></small></span></li>
<li><span class="class"><a href="servermetadata.inc.html#ServerMetadata">ServerMetadata</a><br><small>This class handles server metadata</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ServerUpdateError">ServerUpdateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ServerUrlError">ServerUrlError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UnsupportedFeatureExtension">UnsupportedFeatureExtension</a><br><small></small></span></li>
<li><span class="class"><a href="volumeattachment.inc.html#VolumeAttachment">VolumeAttachment</a><br><small>The VolumeAttachment class represents a volume that is attached
to a server.</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#VolumeError">VolumeError</a><br><small></small></span></li>
</ul>
</li>
<li class="closed">
<span class="folder">DbService</span><ul>
<li><span class="class"><a href="database.inc.html#Database">Database</a><br><small>This class represents a Database in the Rackspace "Red Dwarf"
database-as-a-service product.</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DatabaseCreateError">DatabaseCreateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DatabaseDeleteError">DatabaseDeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DatabaseListError">DatabaseListError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DatabaseNameError">DatabaseNameError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DatabaseUpdateError">DatabaseUpdateError</a><br><small></small></span></li>
<li><span class="class"><a href="instance.inc.html#Instance">Instance</a><br><small>Instance represents an instance of DbService, similar to a Server in a
Compute service</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InstanceCreateError">InstanceCreateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InstanceDeleteError">InstanceDeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InstanceError">InstanceError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InstanceFlavorError">InstanceFlavorError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InstanceUpdateError">InstanceUpdateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#InvalidIdTypeError">InvalidIdTypeError</a><br><small></small></span></li>
<li><span class="class"><a href="user.inc.html#User">User</a><br><small>This class represents a User in the Rackspace "Red Dwarf"
database-as-a-service product.</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UserCreateError">UserCreateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UserDeleteError">UserDeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UserListError">UserListError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UserNameError">UserNameError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UserUpdateError">UserUpdateError</a><br><small></small></span></li>
</ul>
</li>
<li class="closed">
<span class="folder">LoadBalancerService</span><ul>
<li><span class="class"><a href="lbresources.inc.html#Access">Access</a><br><small>sub-resource to manage access lists</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#Algorithm">Algorithm</a><br><small>sub-resource to manage algorithms (read-only)</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#AllowedDomain">AllowedDomain</a><br><small>sub-resource to manage allowed domains</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#BillableLoadBalancer">BillableLoadBalancer</a><br><small>used to get a list of billable load balancers for a specific date range</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#ConnectionLogging">ConnectionLogging</a><br><small>sub-resource to manage connection logging</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#ConnectionThrottle">ConnectionThrottle</a><br><small>sub-resource to manage connection throttling</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#ContentCaching">ContentCaching</a><br><small>sub-resource to manage content caching</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#ErrorPage">ErrorPage</a><br><small>The /loadbalancer/{id}/errorpage manages the error page for the load
balancer.</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#HealthMonitor">HealthMonitor</a><br><small>sub-resource to read health monitor info</small></span></li>
<li><span class="class"><a href="loadbalancer.inc.html#LoadBalancer">LoadBalancer</a><br><small>The LoadBalancer class represents a single load balancer</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#Metadata">Metadata</a><br><small>sub-resource to manage Metadata</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MissingValueError">MissingValueError</a><br><small></small></span></li>
<li><span class="class"><a href="lbresources.inc.html#Node">Node</a><br><small>information on a single node in the load balancer</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#NodeEvent">NodeEvent</a><br><small>a single node event, usually called as part of a Collection</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#Protocol">Protocol</a><br><small>sub-resource to manage protocols (read-only)</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#ReadonlySubResource">ReadonlySubResource</a><br><small>This defines a read-only SubResource - one that cannot be created, updated,
or deleted.</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#SSLTermination">SSLTermination</a><br><small>sub-resource to manage SSL termination</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#SessionPersistence">SessionPersistence</a><br><small>sub-resource to manage session persistence setting</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#Stats">Stats</a><br><small>Stats returns statistics about the load balancer</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#SubResource">SubResource</a><br><small>SubResource is an abstract class that handles subresources of a
LoadBalancer object; for example, the
`/loadbalancers/{id}/errorpage`.</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#Usage">Usage</a><br><small>used to get usage data for a load balancer</small></span></li>
<li><span class="class"><a href="lbresources.inc.html#VirtualIp">VirtualIp</a><br><small>VirtualIp represents a single virtual IP (usually returned in a Collection)</small></span></li>
</ul>
</li>
<li class="closed">
<span class="folder">ObjectStore</span><ul>
<li><span class="class"><a href="container.inc.html#CDNContainer">CDNContainer</a><br><small>A simple container for the CDN Service</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#CdnError">CdnError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#CdnHttpError">CdnHttpError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#CdnNotAvailableError">CdnNotAvailableError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#CdnTtlError">CdnTtlError</a><br><small></small></span></li>
<li><span class="class"><a href="container.inc.html#Container">Container</a><br><small>A regular container with a (potentially) CDN container</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ContainerCreateError">ContainerCreateError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ContainerDeleteError">ContainerDeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ContainerError">ContainerError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ContainerNameError">ContainerNameError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ContainerNotEmptyError">ContainerNotEmptyError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ContainerNotFoundError">ContainerNotFoundError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#CreateUpdateError">CreateUpdateError</a><br><small></small></span></li>
<li><span class="class"><a href="dataobject.inc.html#DataObject">DataObject</a><br><small>A DataObject is an object in the ObjectStore</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#DeleteError">DeleteError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#IOError">IOError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MetadataPrefixError">MetadataPrefixError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#MisMatchedChecksumError">MisMatchedChecksumError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#NoContentTypeError">NoContentTypeError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#NoNameError">NoNameError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ObjFetchError">ObjFetchError</a><br><small></small></span></li>
<li><span class="class"><a href="objstorebase.inc.html#ObjStoreBase">ObjStoreBase</a><br><small>Intermediate (abstract) class to implement shared
features of all object-storage classes</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ObjectCopyError">ObjectCopyError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#ObjectError">ObjectError</a><br><small></small></span></li>
<li><span class="class"><a href="exceptions.inc.html#UnknownParameterError">UnknownParameterError</a><br><small></small></span></li>
</ul>
</li>
<li class="closed">
<span class="folder">VolumeService</span><ul>
<li><span class="class"><a href="snapshot.inc.html#Snapshot">Snapshot</a><br><small>The Snapshot class represents a single block storage snapshot</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#SnapshotError">SnapshotError</a><br><small></small></span></li>
<li><span class="class"><a href="volume.inc.html#Volume">Volume</a><br><small>The Volume class represents a single block storage volume</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#VolumeError">VolumeError</a><br><small></small></span></li>
<li><span class="class"><a href="volumetype.inc.html#VolumeType">VolumeType</a><br><small>The VolumeType class represents a single block storage volume type</small></span></li>
<li><span class="class"><a href="exceptions.inc.html#VolumeTypeError">VolumeTypeError</a><br><small></small></span></li>
</ul>
</li>
</ul>
</li>
<li class="closed">
<span class="folder">global</span><ul></ul>
</li>
</ul>
</div><div class="section">
<h1>Packages</h1>
<ul id="packages-" class="filetree">
<li class="closed">
<span class="folder">Default</span><ul id="packages_Default" class="filetree"></ul>
</li>
<li class="closed">
<span class="folder">phpOpenCloud</span><ul id="packages_phpOpenCloud" class="filetree"></ul>
</li>
</ul>
</div>
</div></div><div id="footer"><div class="padder"></div></div></div></body></html>
Return current item: php-opencloud