Collection
extends Base
in package
Base class for compound DTOs.
Table of Contents
Properties
- $children : array<string|int, mixed>
- $errors : array<string|int, mixed>
- $itemTemplate : Property
- $name : string
- $parent : ICompound|null
- $validRange : NumericRange|null
Methods
- addChild() : Collection
- addErrors() : ICompound
- Adds a validation error to the list.
- clearErrors() : void
- Resets the error list.
- getAsJson() : string
- getChild() : null|ICompound|Property
- getChildren() : array<string|int, mixed>
- getErrors() : array<string|int, mixed>
- Returns a list of validation errors for all parameter values.
- getItemTemplate() : Property
- getName() : string
- getParent() : ICompound|null
- setItemTemplate() : Collection
- setName() : ICompound
- setParent() : ICompound
- setRange() : $this
Properties
$children
private
array<string|int, mixed>
$children
= []
$errors
private
array<string|int, mixed>
$errors
= []
$itemTemplate
private
Property
$itemTemplate
$name
private
string
$name
$parent
private
ICompound|null
$parent
= null
$validRange
private
NumericRange|null
$validRange
= null
Methods
addChild()
public
addChild(ICompound|Property $child) : Collection
Parameters
Return values
CollectionaddErrors()
Adds a validation error to the list.
public
addErrors(array<string|int, mixed> $errors) : ICompound
Parameters
- $errors : array<string|int, mixed>
Return values
ICompoundclearErrors()
Resets the error list.
public
clearErrors() : void
getAsJson()
public
getAsJson() : string
Tags
Return values
stringgetChild()
public
getChild(int $offset) : null|ICompound|Property
Parameters
- $offset : int
Tags
Return values
null|ICompound|PropertygetChildren()
public
getChildren() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getErrors()
Returns a list of validation errors for all parameter values.
public
getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>getItemTemplate()
public
getItemTemplate() : Property
Return values
PropertygetName()
public
getName() : string
Return values
stringgetParent()
public
getParent() : ICompound|null
Return values
ICompound|nullsetItemTemplate()
public
setItemTemplate(Property $itemTemplate) : Collection
Parameters
- $itemTemplate : Property
Return values
CollectionsetName()
public
setName(string $name) : ICompound
Parameters
- $name : string
Return values
ICompoundsetParent()
public
setParent(Dto|null $parent) : ICompound
Parameters
- $parent : Dto|null
Return values
ICompoundsetRange()
public
setRange(int $min, int $max) : $this
Parameters
- $min : int
- $max : int