CORE-POS/IS4C

View on GitHub
fannie/modules/plugins2.0/Otto/noauto/Message.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Gohanman\Otto;

class Message
{
    private $json = array(
        '@type' => 'MessageCard',
        '@context' => 'http://schema.org/extensions',
        'markdown' => true,
    );

    public function body($body)
    {
        $this->json['text'] = $body;
    }

    public function title($subject)
    {
        $this->json['title'] = $subject;
    }

    public function toJSON()
    {
        return json_encode($this->json);
    }
}