Resource
extends Record
in package
Represents a DNS resource record
Tags
Table of Contents
Properties
- $class : int
- $name : DomainName
- $type : int
- $typeFactory : TypeFactory
- $data : RData
- $ttl : int
Methods
- __construct() : mixed
- Constructor
- getClass() : int
- Get the value of the record class field
- getData() : RData
- Get the value of the resource data field
- getName() : DomainName
- Get the value of the record name field
- getTTL() : int
- Get the value of the record TTL field
- getType() : int
- Get the value of the record type field
- setClass() : mixed
- Set the value of the record class field
- setName() : mixed
- Set the value of the record name field
- setTTL() : mixed
- Set the value of the record TTL field
Properties
$class
protected
int
$class
= \LibDNS\Records\ResourceClasses::IN
$name
protected
DomainName
$name
$type
protected
int
$type
$typeFactory
protected
TypeFactory
$typeFactory
$data
private
RData
$data
$ttl
private
int
$ttl
Value of the resource's time-to-live property
Methods
__construct()
Constructor
public
__construct(TypeFactory $typeFactory, int $type, RData $data) : mixed
Parameters
- $typeFactory : TypeFactory
- $type : int
-
Can be indicated using the ResourceTypes enum
- $data : RData
getClass()
Get the value of the record class field
public
getClass() : int
Return values
intgetData()
Get the value of the resource data field
public
getData() : RData
Return values
RDatagetName()
Get the value of the record name field
public
getName() : DomainName
Return values
DomainNamegetTTL()
Get the value of the record TTL field
public
getTTL() : int
Return values
intgetType()
Get the value of the record type field
public
getType() : int
Return values
intsetClass()
Set the value of the record class field
public
setClass(int $class) : mixed
Parameters
- $class : int
-
The new value, can be indicated using the ResourceClasses/ResourceQClasses enums
Tags
setName()
Set the value of the record name field
public
setName(string|DomainName $name) : mixed
Parameters
- $name : string|DomainName
Tags
setTTL()
Set the value of the record TTL field
public
setTTL(int $ttl) : mixed
Parameters
- $ttl : int
-
The new value