27 lines
No EOL
445 B
PHP
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;
|
|
}
|
|
}
|
|
|
|
?>
|