Field
in package
FinalYes
One compiled field spec inside a {@see Compiled} schema. `required` comes from the `?`-suffixed key convention (a field key ending in `?` is optional; no separate flag exists in `.dxns` itself); `default`/`description` only ever come from the `%field{...}` escape hatch, since optionality is already fully covered by the key suffix.
Table of Contents
Constants
- NO_DEFAULT : mixed = \JOetjen\Dextrin\Schema\NoDefault::Instance
Properties
Methods
- __construct() : mixed
Constants
NO_DEFAULT
public
mixed
NO_DEFAULT
= \JOetjen\Dextrin\Schema\NoDefault::Instance
Properties
$default read-only
public
mixed
$default
$description read-only
public
string|null
$description
$name read-only
public
string
$name
$required read-only
public
bool
$required
$type read-only
public
TypeExpr
$type
Methods
__construct()
public
__construct(string $name[, bool $required = true ][, TypeExpr|null $type = null ][, mixed $default = NoDefault::Instance ][, string|null $description = null ]) : mixed
Parameters
- $name : string
- $required : bool = true
- $type : TypeExpr|null = null
- $default : mixed = NoDefault::Instance
- $description : string|null = null