Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Identity
      • Log
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Resource
    • LoadBalancer
      • Resource
    • ObjectStore
      • Constants
      • Exception
      • Resource
      • Upload
    • Orchestration
    • Queues
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • Service
  • Overview
  • Namespace
  • Class
  • Tree
  • Download
 1: <?php
 2: /**
 3:  * PHP OpenCloud library.
 4:  * 
 5:  * @copyright 2013 Rackspace Hosting, Inc. See LICENSE for information.
 6:  * @license   https://www.apache.org/licenses/LICENSE-2.0
 7:  * @author    Glen Campbell <glen.campbell@rackspace.com>
 8:  * @author    Jamie Hannaford <jamie.hannaford@rackspace.com>
 9:  */
10: 
11: namespace OpenCloud\Database;
12: 
13: use OpenCloud\Common\Service\NovaService;
14: use OpenCloud\OpenStack;
15: 
16: /**
17:  * The Rackspace Database As A Service (aka "Red Dwarf")
18:  */
19: class Service extends NovaService
20: {
21:     const DEFAULT_TYPE = 'rax:database';
22:     const DEFAULT_NAME = 'cloudDatabases';
23: 
24:     /**
25:      * Returns a list of flavors
26:      *
27:      * just call the parent FlavorList() method, but pass FALSE
28:      * because the /flavors/detail resource is not supported
29:      *
30:      * @api
31:      * @return \OpenCloud\Compute\FlavorList
32:      */
33:     public function flavorList($details = false, array $filter = array())
34:     {
35:         return parent::flavorList(false);
36:     }
37: 
38:     /**
39:      * Creates a Instance object
40:      *
41:      * @api
42:      * @param string $id the ID of the instance to retrieve
43:      * @return DbService\Instance
44:      */
45:     public function instance($id = null)
46:     {
47:         return new Resource\Instance($this, $id);
48:     }
49: 
50:     /**
51:      * Creates a Collection of Instance objects
52:      *
53:      * @api
54:      * @param array $params array of parameters to pass to the request as
55:      *      query strings
56:      * @return Collection
57:      */
58:     public function instanceList($params = array())
59:     {
60:         return $this->collection('OpenCloud\Database\Resource\Instance', null, null, $params);
61:     }
62: }
63: 
PHP OpenCloud API API documentation generated by ApiGen 2.8.0