monitoring/lib: Add methods `Service::getHostName()' and `Service::getName()'
The upcoming service command objects will require a service object. In order to build the command string, the service command objects require retrieval of the service's host name and the service's name. The actual implementation of the methods is subject to change refs #6593
This commit is contained in:
parent
c3c0043307
commit
a45b17fcd0
|
@ -119,4 +119,24 @@ class Service extends AbstractObject
|
|||
|
||||
return $this->view->getQuery()->fetchRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host name the service is running on
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHostName()
|
||||
{
|
||||
return $this->params->get('host');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the service name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->params->get('service');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue