A time period is a list of times during various days that are considered to be "valid" times for notifications and service checks. More...
Public Member Functions | |
prepare_draw () | |
Prepare an object for drawing. | |
validate_timeperiod_day ($value) | |
Validates the correctness of a timeperiod entry for a specific day. | |
validate_object () | |
Makes sure the object is safe to write to database, and that Nagios can later load the timeperiod in such a way that it does what the user expects of it. | |
normalize ($obj=false, $abort_on_error=true) | |
Takes the any given object (or the current one) and normalizes it. | |
Data Fields | |
$type = 'timeperiod' | |
object type |
A time period is a list of times during various days that are considered to be "valid" times for notifications and service checks.
It consists of time ranges for each day of the week that "rotate" once the week has come to an end. Different types of exceptions to the normal weekly time are supported, including: specific weekdays, days of generic months, days of specific months, and calendar dates.
timeperiod_class::normalize | ( | $ | obj = false , |
|
$ | abort_on_error = true | |||
) |
Takes the any given object (or the current one) and normalizes it.
That is, objects which have textual representations of objects they link to get those textual representations replaced with the linked-to objects' database id numbers in this method. The result replaces the current object.
This method will not remove the old state. If you want that, call self::get_default_object first.
$obj | the object state to normalize, in case it's not $this->obj | |
$abort_on_error | If false, drop invalid variables silently. |
NacomaRelationException |
Reimplemented from object_class.
timeperiod_class::prepare_draw | ( | ) |
Prepare an object for drawing.
Timeperiods always list all variables rather than only the ones that are set.
Reimplemented from object_class.
timeperiod_class::validate_object | ( | ) |
Makes sure the object is safe to write to database, and that Nagios can later load the timeperiod in such a way that it does what the user expects of it.
Reimplemented from object_class.
timeperiod_class::validate_timeperiod_day | ( | $ | value | ) |
Validates the correctness of a timeperiod entry for a specific day.
$value | string: Timeperiod minute-range specification |