webhook2xmpp/classes/webhook_comp/grafana.php
2021-05-15 11:26:20 +02:00

38 lines
No EOL
609 B
PHP

<?php
namespace classes\webhook_comp;
class grafana
{
private $json;
private $readable = "";
public function __construct($json)
{
$this->json = $json;
}
public function readableMessage()
{
if(!empty($this->json->title))
{
$this->readable .= $this->json->title;
}
if(!empty($this->json->message))
{
$this->readable .= $this->json->message;
}
if(!empty($this->json->state))
{
$this->readable .= $this->json->state;
}
return $this->readable;
}
}