Sort of working beta
This commit is contained in:
21
app/Notification/Stringifiable.php
Normal file
21
app/Notification/Stringifiable.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
}
|
Reference in New Issue
Block a user