class DataPropertyType extends DataType

Properties

protected NamedType> $dataObjectTypes

The declared data object types.

protected NamedType|null $dataObjectType
protected NamedType> $dataCollectableTypes

The declared data collection types.

protected NamedType|null $dataCollectableType
protected NamedType> $iterableTypes

The declared iterable types with item metadata.

protected NamedType|null $nonDataIterableType

Methods

__construct(Type $type, bool $isOptional, bool $isNullable, bool $isMixed, string|null $lazyType)

Create a new data property type.

string|null
findAcceptedTypeForBaseType(string $class)

Find the declared type accepted by a base type.

from  DataType
bool
acceptsType(string $type)

Determine if this declaration accepts the given type name.

from  DataType
array
getNamedTypes()

Get every named type in declaration order.

from  DataType
bool
acceptsValue(mixed $value)

Determine if this declaration accepts the given value.

from  DataType
array
getDataObjectTypes()

Get the declared data object types.

NamedType|null
getDataObjectType()

Get the one unambiguous declared data object type.

string|null
getDataObjectClass()

Get the one unambiguous declared data object class.

array
getDataCollectableTypes()

Get the declared data collection types.

NamedType|null
getDataCollectableType()

Get the one unambiguous declared data collection type.

array
getIterableTypes()

Get the declared iterable types with item metadata.

NamedType|null
getNonDataIterableType()

Get the one unambiguous non-data iterable with item metadata.

Details

at line 46
__construct(Type $type, bool $isOptional, bool $isNullable, bool $isMixed, string|null $lazyType)

Create a new data property type.

Parameters

Type $type
bool $isOptional
bool $isNullable
bool $isMixed
string|null $lazyType

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

Find the declared type accepted by a base type.

Parameters

string $class

Return Value

string|null

in DataType at line 33
bool acceptsType(string $type)

Determine if this declaration accepts the given type name.

Parameters

string $type

Return Value

bool

in DataType at line 47
array getNamedTypes()

Get every named type in declaration order.

Return Value

array

in DataType at line 55
bool acceptsValue(mixed $value)

Determine if this declaration accepts the given value.

Parameters

mixed $value

Return Value

bool

at line 91
array getDataObjectTypes()

Get the declared data object types.

Return Value

array

at line 99
NamedType|null getDataObjectType()

Get the one unambiguous declared data object type.

Return Value

NamedType|null

at line 109
string|null getDataObjectClass()

Get the one unambiguous declared data object class.

Return Value

string|null

at line 119
array getDataCollectableTypes()

Get the declared data collection types.

Return Value

array

at line 127
NamedType|null getDataCollectableType()

Get the one unambiguous declared data collection type.

Return Value

NamedType|null

at line 137
array getIterableTypes()

Get the declared iterable types with item metadata.

Return Value

array

at line 145
NamedType|null getNonDataIterableType()

Get the one unambiguous non-data iterable with item metadata.

Return Value

NamedType|null