timeperiod_class Class Reference

A time period is a list of times during various days that are considered to be "valid" times for notifications and service checks. More...

Inheritance diagram for timeperiod_class:
object_class

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

Detailed Description

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.


Member Function Documentation

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.

Parameters:
$obj the object state to normalize, in case it's not $this->obj
$abort_on_error If false, drop invalid variables silently.
Exceptions:
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.

Returns:
True on success, false on errors.

Reimplemented from object_class.

timeperiod_class::validate_timeperiod_day ( value  ) 

Validates the correctness of a timeperiod entry for a specific day.

Parameters:
$value string: Timeperiod minute-range specification
Returns:
True if valid, false if not.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 6 May 2013 for nacoma by  doxygen 1.6.1