file-fetcher
Public Member Functions | List of all members
phpDocumentor\Reflection\Types\Compound Class Reference
Inheritance diagram for phpDocumentor\Reflection\Types\Compound:
phpDocumentor\Reflection\Types\AggregatedType phpDocumentor\Reflection\Type

Detailed Description

Value Object representing a Compound Type.

A Compound Type is not so much a special keyword or object reference but is a series of Types that are separated using an OR operator (|). This combination of types signifies that whatever is associated with this compound type may contain a value with any of the given types.

@psalm-immutable

Public Member Functions

 __construct (array $types)
 
- Public Member Functions inherited from phpDocumentor\Reflection\Types\AggregatedType
 __construct (array $types, string $token)
 
 get (int $index)
 
 has (int $index)
 
 contains (Type $type)
 
 __toString ()
 
 getIterator ()
 

Constructor & Destructor Documentation

◆ __construct()

phpDocumentor\Reflection\Types\Compound::__construct ( array  $types)

Initializes a compound type (i.e. string|int) and tests if the provided types all implement the Type interface.

Parameters
array<Type>$types

The documentation for this class was generated from the following file: