State calculator for not only generating the state for a number of sub-calculators, but also to sum up according to the worst state of them all. More...
Public Member Functions | |
set_sub_reports ($subs) | |
Provide this object with a number of sub reports which we'll keep up to date. | |
initialize ($initial_state, $initial_depth, $is_running) | |
Initializes anything we need for this report to be generated. | |
add_event ($row=false) | |
Given an event (a database row), add it to the current report. | |
get_data () | |
For hysterical reasons, we expect every single report type to return the report data in a brand new way. | |
finalize () | |
Finalize the report, calculating real uptime from our internal meta-format. | |
Protected Member Functions | |
calculate_object_state () | |
Actually discover the overall state based on the sub-reports. | |
Protected Attributes | |
$sub_reports = array() | |
An array of sub-reports for this report. | |
$st_sub = array() | |
Map of sub report [state => [downtime_status => [indexes]]]. |
State calculator for not only generating the state for a number of sub-calculators, but also to sum up according to the worst state of them all.
WorstStateCalculator::get_data | ( | ) |
For hysterical reasons, we expect every single report type to return the report data in a brand new way.
Jay.
Reimplemented from StateCalculator.
WorstStateCalculator::initialize | ( | $ | initial_state, | |
$ | initial_depth, | |||
$ | is_running | |||
) |
Initializes anything we need for this report to be generated.
Warning: all sub reports must have been initialized at this point.
Reimplemented from StateCalculator.
WorstStateCalculator::set_sub_reports | ( | $ | subs | ) |