CollectionOfType
class CollectionOfType implements CompoundType, LateResolvableType
The collection a model's queries return, written collection-of
Traits
Methods
Create a collection-of type.
Resolve the collection class of each model the type stands for.
Determine whether the type can be resolved, which waits for its template types.
Get the classes the type refers to.
Get the template types the type refers to.
Determine whether the type equals another.
Describe the type.
Map the inner types.
Map the inner types together with another collection-of type's.
Convert the type to a PHPDoc node.
Generalize the inner types.
Details
at line 40
__construct(Type $type, CollectionHelper $collectionHelper, Type|null $keyType = null)
Create a collection-of type.
at line 47
protected Type
getResult()
Resolve the collection class of each model the type stands for.
at line 74
bool
isResolvable()
Determine whether the type can be resolved, which waits for its template types.
at line 85
array
getReferencedClasses()
Get the classes the type refers to.
at line 95
array
getReferencedTemplateTypes(TemplateTypeVariance $positionVariance)
Get the template types the type refers to.
at line 110
bool
equals(Type $type)
Determine whether the type equals another.
at line 126
string
describe(VerbosityLevel $level)
Describe the type.
at line 140
Type
traverse(callable $cb)
Map the inner types.
at line 155
Type
traverseSimultaneously(Type $right, callable $cb)
Map the inner types together with another collection-of type's.
at line 174
TypeNode
toPhpDocNode()
Convert the type to a PHPDoc node.
at line 186
Type
generalize(GeneralizePrecision $precision)
Generalize the inner types.