game/_incl_data/class/Status.php

26 lines
435 B
PHP
Raw Normal View History

<?php
class Status
{
private static array $messages = [];
public static function set(string $message)
{
self::$messages[] = $message;
}
public static function get(): string
{
return implode('<br>', self::$messages);
}
public static function print()
{
echo self::get();
}
public static function exists(): bool
{
return !empty(self::$messages);
}
}