mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-05-10 01:30:11 +02:00
79 lines
1.6 KiB
PHP
79 lines
1.6 KiB
PHP
<?php
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
|
|
|
namespace Icinga\Module\Monitoring\Command\Object;
|
|
|
|
/**
|
|
* Send custom notifications for a host or service
|
|
*/
|
|
class SendCustomNotificationCommand extends WithCommentCommand
|
|
{
|
|
/**
|
|
* (non-PHPDoc)
|
|
* @see \Icinga\Module\Monitoring\Command\Object\ObjectCommand::$allowedObjects For the property documentation.
|
|
*/
|
|
protected $allowedObjects = array(
|
|
self::TYPE_HOST,
|
|
self::TYPE_SERVICE
|
|
);
|
|
/**
|
|
* Whether a notification is forced to send
|
|
*
|
|
* Forced notifications are send regardless of time and if notifications
|
|
* are enabled.
|
|
*
|
|
* @type bool
|
|
*/
|
|
protected $forced;
|
|
|
|
/**
|
|
* Broadcast the notification
|
|
*
|
|
* If broadcast is true, the notification is send to all normal and
|
|
* escalated contacts for the object
|
|
*
|
|
* @type bool
|
|
*/
|
|
protected $broadcast;
|
|
|
|
/**
|
|
* Get notification force flag
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function getForced()
|
|
{
|
|
return $this->forced;
|
|
}
|
|
|
|
/**
|
|
* Set whether notification should be forced
|
|
*
|
|
* @param bool $forced
|
|
*/
|
|
public function setForced($forced = true)
|
|
{
|
|
$this->forced = $forced;
|
|
}
|
|
|
|
/**
|
|
* Get notification broadcast flag
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function getBroadcast()
|
|
{
|
|
return $this->broadcast;
|
|
}
|
|
|
|
/**
|
|
* Set notification to broadcast
|
|
*
|
|
* @param bool $broadcast
|
|
*/
|
|
public function setBroadcast($broadcast = true)
|
|
{
|
|
$this->broadcast = $broadcast;
|
|
}
|
|
}
|