webhook2xmpp/classes/webhook.php
Mateusz Pieła 73f3eb8178 Fix
2021-04-27 00:04:19 +02:00

27 lines
No EOL
445 B
PHP

<?php
namespace classes;
class webhook extends core
{
private $json;
public function __construct(string $json)
{
parent::__construct();
if($json)
{
$this->json = json_decode($json, false);
}
else
{
throw new \Exception("JSON is required to use this class");
}
}
public function getMessage()
{
return $this->json->text;
}
}
?>