php-dextrin

Tags
in package

FinalYes

Pure constants -- CBOR tag numbers and bit-layout tables, mirroring `dxn/DXN.md` §2.3 verbatim. No behavior beyond the flag<->byte conversions, which exist here (not in the encoder/decoder) as one shared source of truth for the bit layout, used by both directions.

Table of Contents

Constants

DURATION_FIELDS  : mixed = ['years', 'months', 'weeks', 'days', 'hours', '...
Duration bitmask field order, low bit first (`DXN.md` §2.3).
REGEX_FLAG_BITS  : mixed = ['i', 'm', 's', 'u', 'x', 'f', 'r']
Regex flags byte bit order, low bit first (`DXN.md` §2.3).
T_ARRAY  : mixed = 204
T_BIGNUM_NEG  : mixed = 3
T_BIGNUM_POS  : mixed = 2
T_CHAR  : mixed = 200
T_CUSTOM  : mixed = 214
T_DATE  : mixed = 209
T_DATETIME_OFFSET  : mixed = 211
T_DECIMAL  : mixed = 4
T_DURATION  : mixed = 212
T_KEYWORD  : mixed = 202
T_ORDERED  : mixed = 205
T_RATIONAL  : mixed = 30
T_REGEX  : mixed = 213
T_SET  : mixed = 206
T_SHAREABLE  : mixed = 28
T_SHARED_REF  : mixed = 29
T_SORTED_SET  : mixed = 207
T_STRINGREF  : mixed = 25
T_STRINGREF_NAMESPACE  : mixed = 256
T_STRUCT  : mixed = 208
T_SYMBOL  : mixed = 201
T_TIME  : mixed = 210
T_TIMESTAMP  : mixed = 1
T_TUPLE  : mixed = 203
T_URI  : mixed = 32
T_UUID  : mixed = 37

Methods

durationBitmask()  : int
durationFieldsPresent()  : array<int, string>
regexByteToFlags()  : array<string, bool>
regexFlagsToByte()  : int
__construct()  : mixed

Constants

DURATION_FIELDS

Duration bitmask field order, low bit first (`DXN.md` §2.3).

public mixed DURATION_FIELDS = ['years', 'months', 'weeks', 'days', 'hours', 'minutes', 'microseconds']

REGEX_FLAG_BITS

Regex flags byte bit order, low bit first (`DXN.md` §2.3).

public mixed REGEX_FLAG_BITS = ['i', 'm', 's', 'u', 'x', 'f', 'r']

T_ARRAY

public mixed T_ARRAY = 204

T_BIGNUM_NEG

public mixed T_BIGNUM_NEG = 3

T_BIGNUM_POS

public mixed T_BIGNUM_POS = 2

T_CHAR

public mixed T_CHAR = 200

T_CUSTOM

public mixed T_CUSTOM = 214

T_DATE

public mixed T_DATE = 209

T_DATETIME_OFFSET

public mixed T_DATETIME_OFFSET = 211

T_DECIMAL

public mixed T_DECIMAL = 4

T_DURATION

public mixed T_DURATION = 212

T_KEYWORD

public mixed T_KEYWORD = 202

T_ORDERED

public mixed T_ORDERED = 205

T_RATIONAL

public mixed T_RATIONAL = 30

T_REGEX

public mixed T_REGEX = 213

T_SET

public mixed T_SET = 206

T_SHAREABLE

public mixed T_SHAREABLE = 28

T_SHARED_REF

public mixed T_SHARED_REF = 29

T_SORTED_SET

public mixed T_SORTED_SET = 207

T_STRINGREF

public mixed T_STRINGREF = 25

T_STRINGREF_NAMESPACE

public mixed T_STRINGREF_NAMESPACE = 256

T_STRUCT

public mixed T_STRUCT = 208

T_SYMBOL

public mixed T_SYMBOL = 201

T_TIME

public mixed T_TIME = 210

T_TIMESTAMP

public mixed T_TIMESTAMP = 1

T_TUPLE

public mixed T_TUPLE = 203

T_URI

public mixed T_URI = 32

T_UUID

public mixed T_UUID = 37

Methods

durationFieldsPresent()

public static durationFieldsPresent(int $bitmask) : array<int, string>
Parameters
$bitmask : int
Return values
array<int, string>

regexByteToFlags()

public static regexByteToFlags(int $byte) : array<string, bool>
Parameters
$byte : int
Return values
array<string, bool>

regexFlagsToByte()

public static regexFlagsToByte(array<string, bool> $flags) : int
Parameters
$flags : array<string, bool>
Return values
int

__construct()

private __construct() : mixed
On this page

Search results