TypeDefinitionManager
in package
Holds data about how the RDATA sections of known resource record types are structured
Tags
Table of Contents
Properties
- $definitions : array<string|int, array<string|int, mixed>>
- $fieldDefFactory : FieldDefinitionFactory
- $typeDefFactory : TypeDefinitionFactory
- $typeDefs : array<string|int, mixed>
Methods
- __construct() : mixed
- Constructor
- getTypeDefinition() : TypeDefinition
- Get a type definition for a record type if it is known
- registerTypeDefinition() : mixed
- Register a custom type definition
- setDefinitions() : mixed
- Set the internal definitions structure
Properties
$definitions
private
array<string|int, array<string|int, mixed>>
$definitions
= []
How the RDATA sections of known resource record types are structured
$fieldDefFactory
private
FieldDefinitionFactory
$fieldDefFactory
$typeDefFactory
private
TypeDefinitionFactory
$typeDefFactory
$typeDefs
private
array<string|int, mixed>
$typeDefs
= []
Cache of created definitions
Methods
__construct()
Constructor
public
__construct(TypeDefinitionFactory $typeDefFactory, FieldDefinitionFactory $fieldDefFactory) : mixed
Parameters
- $typeDefFactory : TypeDefinitionFactory
- $fieldDefFactory : FieldDefinitionFactory
getTypeDefinition()
Get a type definition for a record type if it is known
public
getTypeDefinition(int $recordType) : TypeDefinition
Parameters
- $recordType : int
-
Resource type, can be indicated using the ResourceTypes enum
Return values
TypeDefinitionregisterTypeDefinition()
Register a custom type definition
public
registerTypeDefinition(int $recordType, array<string|int, int>|TypeDefinition $definition) : mixed
Parameters
- $recordType : int
-
Resource type, can be indicated using the ResourceTypes enum
- $definition : array<string|int, int>|TypeDefinition
Tags
setDefinitions()
Set the internal definitions structure
private
setDefinitions() : mixed