Collection
extends AbstractList
in package
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
- $defaultKeyType : Type
- $keyType : Type|null
- $valueType : Type
- $fqsen : Fqsen|null
- __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 value for the keys 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
Return values
mixed —__toString()
Returns a rendered output of the Type as it would be used in a DocBlock.
public
__toString() : string
Return values
string —getFqsen()
Returns the FQSEN associated with this object.
public
getFqsen() : Fqsen|null
Return values
Fqsen|null —getKeyType()
Returns the type for the keys of this array.
public
getKeyType() : Type
Return values
Type —getValueType()
Returns the value for the keys of this array.
public
getValueType() : Type