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:
Eric Lippmann 2014-09-04 12:54:52 +02:00
parent c3c0043307
commit a45b17fcd0
1 changed files with 20 additions and 0 deletions

View File

@ -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');
}
}