2014-05-01 22:29:36 +02:00
|
|
|
<?php
|
|
|
|
class Messenger
|
|
|
|
{
|
|
|
|
public static function message($message, $success = true)
|
|
|
|
{
|
|
|
|
if (empty($message))
|
|
|
|
return;
|
|
|
|
|
2014-05-15 10:32:53 +02:00
|
|
|
$context = Core::getContext();
|
2014-05-01 22:29:36 +02:00
|
|
|
|
|
|
|
if (!preg_match('/[.?!]$/', $message))
|
|
|
|
$message .= '.';
|
|
|
|
|
|
|
|
$context->transport->success = $success;
|
|
|
|
$context->transport->message = $message;
|
|
|
|
$context->transport->messageHtml = TextHelper::parseMarkdown($message, true);
|
|
|
|
}
|
|
|
|
}
|