2013-10-20 15:15:30 +02:00
|
|
|
<?php
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
|
|
|
|
namespace Icinga\Protocol\Statusdat;
|
|
|
|
|
|
|
|
class PrintableObject
|
|
|
|
{
|
|
|
|
public function __toString()
|
|
|
|
{
|
|
|
|
if (isset($this->contact_name)) {
|
|
|
|
return $this->contact_name;
|
2014-02-21 14:07:32 +01:00
|
|
|
} elseif (isset($this->service_description)) {
|
2013-10-20 15:15:30 +02:00
|
|
|
return $this->service_description;
|
2014-02-21 14:07:32 +01:00
|
|
|
} elseif (isset($this->host_name)) {
|
2013-10-20 15:15:30 +02:00
|
|
|
return $this->host_name;
|
|
|
|
}
|
|
|
|
return '';
|
|
|
|
}
|
2014-02-21 14:07:32 +01:00
|
|
|
}
|