Inheritance diagram for MagicType:A ReflectionNamedType that supports annotated unions and other helpful things.
Protected Static Properties | |
| static[] | $union = [] |
Protected Properties | |
| string | $def |
Public Static Methods | |
| static self | from (?ReflectionNamedType $type) |
Public Methods | |
| __construct (string $def) | |
| string | __toString () |
| bool | allowsArray () |
| Whether the type allows arrays. More... | |
| bool | allowsGenerator () |
| Whether the type allows generators. More... | |
| bool | allowsMixed () |
Whether the type allows mixed. More... | |
| bool | allowsNull () |
Whether the type allows ?type, mixed, or null More... | |
| bool | allowsType (string $regex) |
| int | count () |
| The number of subtypes in the union. More... | |
| MagicType[] | getSubtypes () |
| Returns the union component types. More... | |
| bool | isBuiltin () |
| bool | isUnion () |
| void | write (RefXML $xml) |
| Reflector writes itself to the XML. More... | |
| bool allowsArray | ( | ) |
Whether the type allows arrays.
| bool allowsGenerator | ( | ) |
Whether the type allows generators.
| bool allowsMixed | ( | ) |
Whether the type allows mixed.
| bool allowsNull | ( | ) |
Whether the type allows ?type, mixed, or null
| bool allowsType | ( | string | $regex | ) |
| string | $regex |
| int count | ( | ) |
The number of subtypes in the union.
|
static |
| null | ReflectionNamedType | $type | Defaults to mixed |
| bool isBuiltin | ( | ) |
| bool isUnion | ( | ) |
| void write | ( | RefXML | $xml | ) |