UnionType
extends Type
in package
FinalYes
Table of Contents
Properties
- $types : mixed
Methods
- __construct() : mixed
- allowsNull() : bool
- asString() : string
- containsIntersectionTypes() : bool
- fromName() : self
- fromValue() : self
- isAssignable() : bool
- isCallable() : bool
- isFalse() : bool
- isGenericObject() : bool
- isIntersection() : bool
- isIterable() : bool
- isMixed() : bool
- isNever() : bool
- isNull() : bool
- isObject() : bool
- isSimple() : bool
- isStatic() : bool
- isTrue() : bool
- isUnion() : bool
- isUnknown() : bool
- isVoid() : bool
- name() : string
- types() : array<string|int, mixed>
- ensureMinimumOfTwoTypes() : void
- ensureOnlyValidTypes() : void
Properties
$types
private
mixed
$types
Tags
Methods
__construct()
public
__construct(Type ...$types) : mixed
Parameters
- $types : Type
Tags
allowsNull()
public
allowsNull() : bool
Return values
boolasString()
public
asString() : string
Return values
stringcontainsIntersectionTypes()
public
containsIntersectionTypes() : bool
Return values
boolfromName()
public
static fromName(string $typeName, bool $allowsNull) : self
Parameters
- $typeName : string
- $allowsNull : bool
Return values
selffromValue()
public
static fromValue(mixed $value, bool $allowsNull) : self
Parameters
- $value : mixed
- $allowsNull : bool
Return values
selfisAssignable()
public
isAssignable(Type $other) : bool
Parameters
- $other : Type
Return values
boolisCallable()
public
isCallable() : bool
Tags
Return values
boolisFalse()
public
isFalse() : bool
Tags
Return values
boolisGenericObject()
public
isGenericObject() : bool
Tags
Return values
boolisIntersection()
public
isIntersection() : bool
Tags
Return values
boolisIterable()
public
isIterable() : bool
Tags
Return values
boolisMixed()
public
isMixed() : bool
Tags
Return values
boolisNever()
public
isNever() : bool
Tags
Return values
boolisNull()
public
isNull() : bool
Tags
Return values
boolisObject()
public
isObject() : bool
Tags
Return values
boolisSimple()
public
isSimple() : bool
Tags
Return values
boolisStatic()
public
isStatic() : bool
Tags
Return values
boolisTrue()
public
isTrue() : bool
Tags
Return values
boolisUnion()
public
isUnion() : bool
Tags
Return values
boolisUnknown()
public
isUnknown() : bool
Tags
Return values
boolisVoid()
public
isVoid() : bool
Tags
Return values
boolname()
public
name() : string
Return values
stringtypes()
public
types() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>ensureMinimumOfTwoTypes()
private
ensureMinimumOfTwoTypes(Type ...$types) : void
Parameters
- $types : Type
Tags
ensureOnlyValidTypes()
private
ensureOnlyValidTypes(Type ...$types) : void
Parameters
- $types : Type