public static function printMessages($clearQueue = true)
    {
        if (!empty($_SESSION[__TRAIT__])) {
            /** @var Message $message */
            foreach ($_SESSION[__TRAIT__] as $message) {
                $message->output();
            }
        }

        if ($clearQueue) {
            static::clearQueue();
        }
    }