Skip to content
docsv0.1.0

FieldParser

Parses the `--fields` DSL (`name:type[:mods]`, comma-separated; leading `?` = nullable) into a list of {@see FieldSpec}. Supports scalars (+ length / precision,scale mods), `enum:<Enum>`, and `<name>:belongsTo:<Target>` (ManyToOne). Throws on any unrecognised token.

FieldParser::parse()

public function parse(string $dsl): array

Parses the full `--fields` DSL string into a list of {@see FieldSpec}.

Parameters

Parameters of parse()
NameTypeDescription
$dslstring