Flow PHP

Types implements Countable, Stringable

Read onlyYes
FinalYes

Unique collection of types.

Tags
template-covariant

Interfaces

Countable
Stringable

Methods

__construct()  : mixed
__toString()  : string
all()  : array<string|int, Type<string|int, T>>
count()  : int
deduplicate()  : Types<string|int, T>
first()  : Type<string|int, T>|null
has()  : bool
hasAll()  : bool
hasAny()  : bool
only()  : Types<string|int, T>
reduceOptionals()  : Types<string|int, mixed>
Reduce optional types to their base types.
without()  : Types<string|int, T>

Methods

__construct()

public __construct(Type<string|int, T...$types) : mixed
Parameters
$types : Type<string|int, T>

__toString()

public __toString() : string
Return values
string

all()

public all() : array<string|int, Type<string|int, T>>
Return values
array<string|int, Type<string|int, T>>

count()

public count() : int
Return values
int

deduplicate()

public deduplicate() : Types<string|int, T>
Return values
Types<string|int, T>

first()

public first() : Type<string|int, T>|null
Return values
Type<string|int, T>|null

has()

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

hasAll()

public hasAll(Type<string|int, mixed> ...$types) : bool
Parameters
$types : Type<string|int, mixed>
Return values
bool

hasAny()

public hasAny(Type<string|int, mixed> ...$types) : bool
Parameters
$types : Type<string|int, mixed>
Return values
bool

only()

public only(Type<string|int, mixed> ...$types) : Types<string|int, T>
Parameters
$types : Type<string|int, mixed>
Return values
Types<string|int, T>

reduceOptionals()

Reduce optional types to their base types.

public reduceOptionals() : Types<string|int, mixed>
Return values
Types<string|int, mixed>

without()

public without(Type<string|int, mixed> ...$types) : Types<string|int, T>
Parameters
$types : Type<string|int, mixed>
Return values
Types<string|int, T>

        
On this page

Search results