class OpenCReport\ReportBreak { public final get_next(): ?OpenCReport\ReportBreak; public final breakfield_add( OpenCReport\Expr $breakfield_expr): void; public final check_fields(): bool; public final reset_vars(): void; public final add_trigger_cb( ?string $callback): void; public final name(): string; public final header(): OpenCReport\Output; public final footer(): OpenCReport\Output; }
Get the next break object from the chain of
breaks in the report this break belongs to.
This method may only be called on an
object that was marked as an iterator,
i.e. one that was created by
OpenCReport\Report::break_get_first()
.
public final OpenCReport\ReportBreak::get_next(): ?OpenCReport\ReportBreak;
Add a breakfield to a break. A break may consists of multiple breakfields. A break triggers if any of the breakfields change from one data line to another.
public final OpenCReport\ReportBreak::breakfield_add( OpenCReport\Expr $breakfield_expr): void;
Check breakfields of a break.
This method returns true
if the break
triggers, i.e. field values for the current data row
do not match the values for the previous data row.
It also the triggers for the first row when there is
no previous row.
It is used internally by the report executor
and also used by unit tests. It may be useful
to implement a custom report executor.
public final OpenCReport\ReportBreak::check_fields(): bool;
Reset report variables associated with a break. Such variables were created with specifying the "reset on break" break name. These variables restart from their initial values. It is used internally by the report executor and also used by unit tests. It may be useful to implement a custom report executor.
public final OpenCReport\ReportBreak::reset_vars(): void;
Add a "trigger" callback to the break.
public final OpenCReport\ReportBreak::add_trigger_cb( ?string $callback): void;
Get the name of a break. It may be useful if the breaks were added via a report XML descriptor but variables are added afterwards from code.
public final OpenCReport\ReportBreak::name(): string;
Get the header and footer sections of a break.
See also BreakHeader and
BreakFooter.
For class methods of OpenCReport\Output
,
see Section 12.16
public final OpenCReport\ReportBreak::header(): OpenCReport\Output; public final OpenCReport\ReportBreak::footer(): OpenCReport\Output;