php-dextrin

Dextrin

Table of Contents

Namespaces

Binary
Document
Schema
Text
Value

Interfaces

HasCategory
Implemented by any exception that knows its DXN.md §5 category -- `syntax`, `binary`, `encode/unsupported`, ... -- so {@see DXNError::wrap()} can carry it across without knowing every concrete exception class, the way {@see HasOffset} carries an offset.
HasOffset
Implemented by any exception that can report a byte/character offset into the source it failed on (lexer/parser errors) -- lets {@see DXNError::wrap()} preserve that offset without needing to know about every concrete exception class in the text/binary pipelines.

Classes

Canonical
The canonical form of a value (DXN.md §1.5): one `.dxn` rendering, fixed down to the byte, so values from different implementations can be compared as text.
Conformance
This implementation's answers to the Dextrin Conformance Suite.
Dextrin
Public API entry point: `.dxn` text and `.dxnb` binary decode/ encode, plus `.dxns` schema-backed struct decoding and encode-time validation via an optional {@see Registry}.
Document
A `.dxn` document with everything it holds: its value, and every comment, blank line and comma around it (`design/comment-retention.md` in `dextrin`), mirroring `Dextrin.Document`.
DXNError
One exception type for every `dextrin` failure mode -- text-parse, printing, and (in later phases) binary/schema failures alike -- so a caller never has to special-case which pipeline produced it.
Format
The three forms' names on the wire and on disk, and a cheap test of whether a body is worth decoding as one -- DXN.md §6, mirroring `Dextrin.Format`, so every implementation answers the same.
KeyNotAllowed
A map key that DXN.md §1.6 does not allow, with its `key/not-allowed` category.
MapBuilder
Builds a decoded DXN `map` -- shared by the text {@see \JOetjen\Dextrin\Text\Parser} and the binary {@see \JOetjen\Dextrin\Binary\Decoder}, which need identical logic.
MapKey
Which values may be map keys (DXN.md §1.6): a string, keyword, integer, uuid, objectid, date, bytes, symbol or char. Anything else is refused as `key/not-allowed` -- in text, in binary and when encoding.
Registry
Extension point for both `struct` and `custom-tag` decoding/encoding.
Schema
Public entry point for `.dxns` schema compilation and validation.
UnsupportedValue
A value with no DXN meaning -- a closure, a resource -- refused by the printer and the binary encoder alike, with DXN.md §5's `encode/unsupported` category.

Enums

Form
One of DXN's three forms: text (`.dxn`), binary (`.dxnb`) and schemas (`.dxns`). See {@see Format}.
On this page

Search results