Collection
extends AbstractList
in package
FinalYes
Represents a collection type as described in the PSR-5, the PHPDoc Standard.
A collection can be represented in two forms:
-
ACollectionObject<aValueType>
-
ACollectionObject<aValueType,aKeyType>
- ACollectionObject can be 'array' or an object that can act as an array
- aValueType and aKeyType can be any type expression
Tags
Table of Contents
Properties
- $defaultKeyType : Type
- $keyType : Type|null
- $valueType : Type
- $fqsen : Fqsen|null
Methods
- __construct() : mixed
- Initializes this representation of an array with the given Type or Fqsen.
- __toString() : string
- Returns a rendered output of the Type as it would be used in a DocBlock.
- getFqsen() : Fqsen|null
- Returns the FQSEN associated with this object.
- getKeyType() : Type
- Returns the type for the keys of this array.
- getValueType() : Type
- Returns the type for the values of this array.
Properties
$defaultKeyType
protected
Type
$defaultKeyType
$keyType
protected
Type|null
$keyType
$valueType
protected
Type
$valueType
$fqsen
private
Fqsen|null
$fqsen
Methods
__construct()
Initializes this representation of an array with the given Type or Fqsen.
public
__construct(Fqsen|null $fqsen, Type $valueType[, Type|null $keyType = null ]) : mixed
Parameters
__toString()
Returns a rendered output of the Type as it would be used in a DocBlock.
public
__toString() : string
Return values
stringgetFqsen()
Returns the FQSEN associated with this object.
public
getFqsen() : Fqsen|null
Return values
Fqsen|nullgetKeyType()
Returns the type for the keys of this array.
public
getKeyType() : Type
Return values
TypegetValueType()
Returns the type for the values of this array.
public
getValueType() : Type