php-dextrin

Particle
in package

FinalYes

One of a `{:list-items}`'s items (DXNS.md ยง1a): a type for exactly one item, or a repeat of a group of them, `$max` `null` when there is no upper bound.

Table of Contents

Properties

$group  : array<string|int, mixed>|null
$max  : int|null
$min  : int
$type  : TypeExpr|null

Methods

map()  : self
This particle with every type in it replaced by what `$map` makes of it.
one()  : self
Exactly one item, a `$type`.
repeat()  : self
The `$group`'s items, together, between `$min` and `$max` times.
types()  : array<int, TypeExpr>
Every type in this particle, in order.
__construct()  : mixed

Properties

$group read-only

public array<string|int, mixed>|null $group

Methods

one()

Exactly one item, a `$type`.

public static one(TypeExpr $type) : self
Parameters
$type : TypeExpr
Return values
self

repeat()

The `$group`'s items, together, between `$min` and `$max` times.

public static repeat(array<int, self> $group, int $min, int|null $max) : self
Parameters
$group : array<int, self>
$min : int
$max : int|null
Return values
self

__construct()

private __construct(TypeExpr|null $type, array<int, self>|null $group, int $min, int|null $max) : mixed
Parameters
$type : TypeExpr|null
$group : array<int, self>|null
$min : int
$max : int|null
On this page

Search results