MMCT TEAM
Server IP : 192.185.129.71  /  Your IP : 3.128.181.81
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/PopupMessage.php
<?php

namespace app\services\messages;

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

use app\services\messages\AbstractPopupMessage;

class PopupMessage
{
    private $message;

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

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

        $this->message = $message;
    }

    public function check(...$params)
    {
        if ($this->message->isVisible(...$params)) {
            $this->set(...$params);
        }
    }

    public function set(...$params)
    {
        set_system_popup($this->message->getMessage(...$params));
    }
}

MMCT - 2023