Documentation

ArrayType extends Type
in package

FinalYes

A runtime type check for values of type T.

Tags
template-covariant

of array-key = array-key

= mixed

Table of Contents

Properties

$keyType  : Type|null
$valueType  : Type|null

Methods

__construct()  : mixed
accepts()  : bool
array()  : ArrayType<TKey, TValue>
bool()  : BoolType
float()  : FloatType
int()  : IntType
name()  : string
object()  : ObjectType<string|int, TObject>
string()  : StringType

Properties

Methods

__construct()

public __construct([Type<string|int, TValue>|null $valueType = null ][, Type<string|int, TKey>|null $keyType = null ]) : mixed
Parameters
$valueType : Type<string|int, TValue>|null = null
$keyType : Type<string|int, TKey>|null = null

accepts()

public accepts(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

array()

public static array([Type<string|int, TValue>|null $valueType = null ][, Type<string|int, TKey>|null $keyType = null ]) : ArrayType<TKey, TValue>
Parameters
$valueType : Type<string|int, TValue>|null = null
$keyType : Type<string|int, TKey>|null = null
Tags
template
Return values
ArrayType<TKey, TValue>

name()

public name() : string
Return values
string

object()

public static object(TObject> $class) : ObjectType<string|int, TObject>
Parameters
$class : TObject>
Tags
template
Return values
ObjectType<string|int, TObject>

        
On this page

Search results