icingaweb2/library/Icinga/Protocol/Statusdat/PrintableObject.php

21 lines
473 B
PHP
Raw Normal View History

<?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)) {
return $this->service_description;
2014-02-21 14:07:32 +01:00
} elseif (isset($this->host_name)) {
return $this->host_name;
}
return '';
}
2014-02-21 14:07:32 +01:00
}