2014-09-11 17:18:07 +02:00
|
|
|
<?php
|
2016-02-08 15:41:00 +01:00
|
|
|
/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
|
2014-09-11 17:18:07 +02:00
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\Command\Object;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class for commands adding comments
|
|
|
|
*/
|
|
|
|
abstract class WithCommentCommand extends ObjectCommand
|
|
|
|
{
|
2020-05-14 13:51:21 +02:00
|
|
|
use CommandAuthor;
|
2014-09-11 17:18:07 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Comment
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $comment;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the comment
|
|
|
|
*
|
|
|
|
* @param string $comment
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function setComment($comment)
|
|
|
|
{
|
|
|
|
$this->comment = (string) $comment;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the comment
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getComment()
|
|
|
|
{
|
|
|
|
return $this->comment;
|
|
|
|
}
|
|
|
|
}
|