class DataType

Methods

__construct(Type $type, bool $isNullable, bool $isMixed)

Create a new data type.

string|null
findAcceptedTypeForBaseType(string $class)

Find the declared type accepted by a base type.

bool
acceptsType(string $type)

Determine if this declaration accepts the given type name.

array
getNamedTypes()

Get every named type in declaration order.

bool
acceptsValue(mixed $value)

Determine if this declaration accepts the given value.

Details

at line 15
__construct(Type $type, bool $isNullable, bool $isMixed)

Create a new data type.

Parameters

Type $type
bool $isNullable
bool $isMixed

at line 25
string|null findAcceptedTypeForBaseType(string $class)

Find the declared type accepted by a base type.

Parameters

string $class

Return Value

string|null

at line 33
bool acceptsType(string $type)

Determine if this declaration accepts the given type name.

Parameters

string $type

Return Value

bool

at line 47
array getNamedTypes()

Get every named type in declaration order.

Return Value

array

at line 55
bool acceptsValue(mixed $value)

Determine if this declaration accepts the given value.

Parameters

mixed $value

Return Value

bool