Represents a collection type as described in the PSR-5, the PHPDoc Standard.

A collection can be represented in two forms:

  1. ACollectionObject<aValueType>
  2. ACollectionObject<aValueType,aKeyType>
  • ACollectionObject can be 'array' or an object that can act as an array
  • aValueType and aKeyType can be any type expression
  • psalm-immutable
public __construct(?phpDocumentor\Reflection\Fqsen $fqsen, phpDocumentor\Reflection\Type $valueType, ?phpDocumentor\Reflection\Type $keyType = NULL)

Initializes this representation of an array with the given Type or Fqsen.

public __toString() : string

Returns a rendered output of the Type as it would be used in a DocBlock.

public getFqsen() : ?phpDocumentor\Reflection\Fqsen

Returns the FQSEN associated with this object.

public phpDocumentor\Reflection\Types\AbstractList::getKeyType() : phpDocumentor\Reflection\Type

Returns the type for the keys of this array.

public phpDocumentor\Reflection\Types\AbstractList::getValueType() : phpDocumentor\Reflection\Type

Returns the type for the values of this array.

protected phpDocumentor\Reflection\Types\AbstractList::$defaultKeyType = NULL
  • var \Type
protected phpDocumentor\Reflection\Types\AbstractList::$keyType = NULL
  • var \Type|null
protected phpDocumentor\Reflection\Types\AbstractList::$valueType = NULL
  • var \Type
private $fqsen = NULL
  • var \Fqsen|null
© 2024 Bruce Wells
Search Namespaces \ Classes