IntersectionType
class IntersectionType extends CombinationType
Properties
| protected NamedType> | $namedTypes | The flattened named types in declaration order. |
from CombinationType |
| protected null|"array"|"bool"|"float"|"int"|"string" | $singleBuiltinType | The one unambiguous built-in type. |
from CombinationType |
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 the one unambiguous built-in type in this declaration.
Details
at line 12
bool
acceptsType(string $type)
Determine if this declaration accepts the given type name.
at line 26
bool
acceptsValue(mixed $value)
Determine if this declaration accepts the given value.
at line 40
bool
guaranteesType(string $type)
Determine if every value accepted by this declaration is an instance of the given type.
at line 54
string|null
findAcceptedTypeForBaseType(string $class)
Find the declared type accepted by a base type.
in
CombinationType at line 56
array
getNamedTypes()
Get every named type in declaration order.
in
CombinationType at line 66
string|null
getSingleBuiltinType()
Get the one unambiguous built-in type in this declaration.
in
CombinationType at line 28
__construct(array $types)
Create a new combination type.