Overview

Namespaces

  • None
  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Exceptions
      • Log
      • Request
        • Response
    • Compute
    • Database
    • DNS
    • LoadBalancer
      • Resources
    • ObjectStore
      • Resource
    • Orchestration
    • Volume
  • PHP

Classes

  • AsyncResponse
  • Domain
  • Object
  • PtrRecord
  • Record
  • Service
  • Subdomain
  • Overview
  • Namespace
  • Class
  • Tree
  • Download
 1: <?php
 2: /**
 3:  * PHP OpenCloud library.
 4:  * 
 5:  * @copyright Copyright 2013 Rackspace US, Inc. See COPYING for licensing information.
 6:  * @license   https://www.apache.org/licenses/LICENSE-2.0 Apache 2.0
 7:  * @version   1.6.0
 8:  * @author    Glen Campbell <glen.campbell@rackspace.com>
 9:  * @author    Jamie Hannaford <jamie.hannaford@rackspace.com>
10:  */
11: 
12: namespace OpenCloud\DNS;
13: 
14: /**
15:  * The Record class represents a single domain record
16:  *
17:  * This is also used for PTR records.
18:  */
19: class Record extends Object 
20: {
21: 
22:     public $ttl;
23:     public $updated;
24:     public $created;
25:     public $name;
26:     public $id;
27:     public $type;
28:     public $data;
29:     public $priority;
30:     public $comment;
31: 
32:     protected static $json_name = false;
33:     protected static $json_collection_name = 'records';
34:     protected static $url_resource = 'records';
35: 
36:     protected $parent;
37:     
38:     protected $updateKeys = array(
39:         'name',
40:         'ttl',
41:         'data',
42:         'priority',
43:         'comment'
44:     );
45:     
46:     protected $createKeys = array(
47:         'type',
48:         'name',
49:         'ttl',
50:         'data',
51:         'priority',
52:         'comment'
53:     );
54: 
55:     /**
56:      * create a new record object
57:      *
58:      * @param mixed $parent either the domain object or the DNS object (for PTR)
59:      * @param mixed $info ID or array/object of data for the object
60:      * @return void
61:      */
62:     public function __construct($parent, $info = null) 
63:     {
64:         $this->parent = $parent;
65:         
66:         if ($parent instanceof Service) {
67:             parent::__construct($parent, $info);
68:         } else {
69:             parent::__construct($parent->getService(), $info);
70:         }
71:     }
72: 
73:     /**
74:      * returns the parent domain
75:      *
76:      * @return Domain
77:      */
78:     public function Parent() 
79:     {
80:         return $this->parent;
81:     }
82: 
83: }
84: 
PHP OpenCloud API API documentation generated by ApiGen 2.8.0