\phpDocumentor\Descriptor\TypeCollectionDescriptor

Descriptor representing a collection or compound type of collection object.

This descriptor represents any type that is capable of containing other typed values. Examples of such types can be an array, DoctrineCollection or ArrayObject.

Summary

Methods
Properties
Constants
__construct()
getName()
getBaseType()
setBaseType()
setTypes()
getTypes()
setKeyTypes()
getKeyTypes()
__toString()
No public properties found
No constants found
No protected methods found
$baseType
$types
$keyTypes
N/A
No private methods found
No private properties found
N/A

Properties

Methods

getBaseType()

getBaseType() : \phpDocumentor\Descriptor\Interfaces\TypeInterface|null

Returns the base type for this Collection or null if there is no attached type.

When the presented collection is governed by an object (such as a Collection object) then a reference to that object will be returned. If however the base type for this collection is a simple type such as an 'array' then we return null to indicate there is no object governing this type.

Returns

\phpDocumentor\Descriptor\Interfaces\TypeInterface|null

setTypes()

setTypes(array<mixed,\phpDocumentor\Descriptor\Interfaces\TypeInterface>  $types) : void

Register the type, or set of types, to which a value in this type of collection can belong.

Parameters

array<mixed,\phpDocumentor\Descriptor\Interfaces\TypeInterface> $types

getTypes()

getTypes() : array<mixed,\phpDocumentor\Descriptor\Interfaces\TypeInterface>

Returns the type, or set of types, to which a value in this type of collection can belong.

Returns

array<mixed,\phpDocumentor\Descriptor\Interfaces\TypeInterface>

setKeyTypes()

setKeyTypes(array<mixed,\phpDocumentor\Descriptor\Interfaces\TypeInterface>  $types) : void

Registers the type, or set of types, to which a *key* in this type of collection can belong.

Parameters

array<mixed,\phpDocumentor\Descriptor\Interfaces\TypeInterface> $types

getKeyTypes()

getKeyTypes() : array<mixed,\phpDocumentor\Descriptor\Interfaces\TypeInterface>

Registers the type, or set of types, to which a *key* in this type of collection can belong.

Returns

array<mixed,\phpDocumentor\Descriptor\Interfaces\TypeInterface>

__toString()

__toString() : string

Returns a human-readable representation for this type.

Returns

string