SortedByConstraint implements Constraint, Stateful
FinalYes
Interfaces
- Constraint
- Stateful
- Every run starts from a fresh instance; a parallel read never ships it to a worker.
Methods
- __construct() : mixed
- A reference is expected in ascending order.
- firstViolation() : int|null
- Index of the first row that violates; state advances over the rows before it.
- fresh() : static
- A new instance in the state this one was constructed in.
- toString() : string
- violation() : string
Methods
__construct()
A reference is expected in ascending order.
public
__construct(Reference|SortColumn|string $column, Reference|SortColumn|string ...$columns) : mixed
Parameters
- $column : Reference|SortColumn|string
- $columns : Reference|SortColumn|string
firstViolation()
Index of the first row that violates; state advances over the rows before it.
public
firstViolation(Rows $rows) : int|null
Parameters
- $rows : Rows
Return values
int|nullfresh()
A new instance in the state this one was constructed in.
public
fresh() : static
Return values
statictoString()
public
toString() : string
Return values
stringviolation()
public
violation(Rows $rows, int $index) : string
Parameters
- $rows : Rows
- $index : int