icingadb-web/library/Icingadb/Command/Object/ObjectCommand.php
Johannes Meyer c6832d5740 Add monitoring's command implementation
Without all the Icinga 1.x burden and weird work-arounds.
2021-03-09 09:13:20 +01:00

45 lines
789 B
PHP

<?php
/* Icinga DB Web | (c) 2021 Icinga GmbH | GPLv2 */
namespace Icinga\Module\Icingadb\Command\Object;
use Icinga\Module\Icingadb\Command\IcingaCommand;
use ipl\Orm\Model;
/**
* Base class for commands that involve a monitored object, i.e. a host or service
*/
abstract class ObjectCommand extends IcingaCommand
{
/**
* Involved object
*
* @var Model
*/
protected $object;
/**
* Set the involved object
*
* @param Model $object
*
* @return $this
*/
public function setObject(Model $object)
{
$this->object = $object;
return $this;
}
/**
* Get the involved object
*
* @return Model
*/
public function getObject()
{
return $this->object;
}
}