<?php

namespace App\Notification;

use Parsedown;

abstract class Stringifiable{
    private Parsedown $parsedown;

    public function __construct() {
        $this->parsedown = new Parsedown();
    }

    abstract public function toString(): string;

    public function toHTMLString(): string {
        return $this->parsedown->text($this->toMarkdownString());
    }

    abstract public function toMarkdownString(): string;
}
