Flow PHP

StringTypeNarrower implements TypeNarrower

FinalYes

Interfaces

TypeNarrower

Methods

__construct()  : mixed
emitsType()  : bool
narrow()  : Type<string|int, mixed>

Methods

__construct()

public __construct([null|array<int, Type<string|int, mixed>> $emits = null ]) : mixed
Parameters
$emits : null|array<int, Type<string|int, mixed>> = null
  • the types this narrower may return; null runs every rung. A rung whose type is not listed never evaluates its predicate.

emitsType()

public emitsType(Type<string|int, mixed> $type) : bool
Parameters
$type : Type<string|int, mixed>
Return values
bool

narrow()

public narrow(mixed $value) : Type<string|int, mixed>
Parameters
$value : mixed
Return values
Type<string|int, mixed>
On this page

Search results