NamedType
class NamedType extends Type
Properties
| bool | $isCastable |
Methods
Determine if this declaration accepts the given type name.
Determine if this declaration accepts the given value.
Determine if every value accepted by this declaration is an instance of the given type.
Find the declared type accepted by a base type.
Get every named type in declaration order.
Get the one unambiguous built-in type in this declaration.
Create a new named type.
Determine if a class or interface type exists.
Details
at line 36
bool
acceptsType(string $type)
Determine if this declaration accepts the given type name.
at line 56
bool
acceptsValue(mixed $value)
Determine if this declaration accepts the given value.
at line 79
bool
guaranteesType(string $type)
Determine if every value accepted by this declaration is an instance of the given type.
at line 87
string|null
findAcceptedTypeForBaseType(string $class)
Find the declared type accepted by a base type.
at line 105
array
getNamedTypes()
Get every named type in declaration order.
at line 115
string|null
getSingleBuiltinType()
Get the one unambiguous built-in type in this declaration.
at line 22
__construct(string $name, bool $builtIn, DataTypeKind $kind, string|null $dataClass = null, string|null $iterableClass = null, Type|null $iterableItemType = null)
Create a new named type.
at line 126
static protected bool
typeExists(string $type)
Determine if a class or interface type exists.