icingadb-web/library/Icingadb/Command/IcingaCommand.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

22 lines
455 B
PHP

<?php
/* Icinga DB Web | (c) 2021 Icinga GmbH | GPLv2 */
namespace Icinga\Module\Icingadb\Command;
/**
* Base class for commands sent to an Icinga instance
*/
abstract class IcingaCommand
{
/**
* Get the name of the command
*
* @return string
*/
public function getName()
{
$nsParts = explode('\\', get_called_class());
return substr_replace(end($nsParts), '', -7); // Remove 'Command' Suffix
}
}