Documentation

Resource extends Record
in package

Represents a DNS resource record

Tags
category

LibDNS

author

Chris Wright https://github.com/DaveRandom

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

$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
int

getData()

Get the value of the resource data field

public getData() : RData
Return values
RData

getTTL()

Get the value of the record TTL field

public getTTL() : int
Return values
int

getType()

Get the value of the record type field

public getType() : int
Return values
int

setClass()

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
throws
RangeException

When the supplied value is outside the valid range 0 - 65535

setName()

Set the value of the record name field

public setName(string|DomainName $name) : mixed
Parameters
$name : string|DomainName
Tags
throws
UnexpectedValueException

When the supplied value is not a valid domain name

setTTL()

Set the value of the record TTL field

public setTTL(int $ttl) : mixed
Parameters
$ttl : int

The new value

Tags
throws
RangeException

When the supplied value is outside the valid range 0 - 4294967296


        
On this page

Search results