contact_class Class Reference

A contact definition is used to identify someone who should be contacted in the event of a problem on your network. More...

Inheritance diagram for contact_class:
object_class contact_template_class

Public Member Functions

 __construct ($id=false, $should_contain_user_class=false)
 get_properties ()
 Fetches the properties for the current object type.
 validate_object ()
 Validate the object as sane prior to writing it to database.
 save_object ($user=true)
 Writes the $this->obj to the database if it validates properly.
 banish_object ($user=true)
 The 'real' delete function.

Data Fields

 $type = 'contact'
 object type
 $nagios_defaults
 Nagios' default settings.

Protected Attributes

 $should_contain_user_class = false
 If true, merge in user (access right) properties.

Detailed Description

A contact definition is used to identify someone who should be contacted in the event of a problem on your network.

This is not always a user, which means not all contacts can log into the Monitor GUI.


Constructor & Destructor Documentation

contact_class::__construct ( id = false,
should_contain_user_class = false 
)
Parameters:
$id = false
$should_contain_user_class = false

Member Function Documentation

contact_class::banish_object ( user = true  ) 

The 'real' delete function.

Parameters:
$user true if this was a user-initiated delete. Set to false when doing things that shouldn't show up in the changelog, such as undoes.

Error or success messages can be retrieved from get_deletion_message()

Returns:
True if the object was deleted, False otherwise.

Reimplemented from object_class.

contact_class::save_object ( user = true  ) 

Writes the $this->obj to the database if it validates properly.

Parameters:
$user false if this change isn't made by a user. If not, no validation will be performed, and the change won't show up in the changelog.
Returns:
true if everything worked out ok; false if not.

Reimplemented from object_class.

contact_class::validate_object (  ) 

Validate the object as sane prior to writing it to database.

Either email or pager must be set for contacts, or nagios will complain when loading the config.

Returns:
boolean True on success, false on errors.

Reimplemented from object_class.


Field Documentation

contact_class::$nagios_defaults
Initial value:
 array(
                'host_notification_options' => array('n' => ''),
                'service_notification_options' => array('n' => ''),
                'host_notifications_enabled' => 1,
                'service_notifications_enabled' => 1,
                'can_submit_commands' => 0,
                'retain_status_information' => 1,
                'retain_nonstatus_information' => 1
        )

Nagios' default settings.

Reimplemented from object_class.


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

Generated on 22 Nov 2012 for nacoma by  doxygen 1.6.1