<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] ?: array()) + array("_8fa7086a24cad" . "7c091bc88b5367" . "e5a35" => base64_decode("Q291bGRuJ3QgYWRkIHN1YnNjcmlwdGlvbiB0byB" . "0aGUgZ3JvdXA6IHdyb25nIHBhcmFtZXRlciB0eX" . "BlLg=="));






class NotificationSubscriptionGroup extends ErrorHandler
{
    protected $subscription_list;
    
    
    
    
    public function __construct()
    {
        $this->subscription_list = array();
    }
    
    
    
    
    
    
    
    
    
    public function AddSubscription($_b15aac3aa29c10ea6d1228f58cb9a7e8, $event, $_d430feef04e2081c6a19d73f26e855dc = false, $user_id = null)
    {
        try {
            switch ($_b15aac3aa29c10ea6d1228f58cb9a7e8->GetAggregation()) {
                
                
                
                
                
                default:
                    $_1c926d1a6fc7c3a4767e0ae4f217a4fb = new NotificationSubscription($_b15aac3aa29c10ea6d1228f58cb9a7e8, $event, $_d430feef04e2081c6a19d73f26e855dc, $user_id);
                    break;
            }
            $this->AddSubscriptionObject($_1c926d1a6fc7c3a4767e0ae4f217a4fb);
        } catch (Exception $_51901849a38ef00bd3ed0b9e535ac45d) {
            return $this->SetErrMsg($_51901849a38ef00bd3ed0b9e535ac45d->getMessage());
        }
        return true;
    }
    
    
    
    
    
    
    
    public function AddSubscriptionObject($_1c926d1a6fc7c3a4767e0ae4f217a4fb)
    {
        if (!$_1c926d1a6fc7c3a4767e0ae4f217a4fb instanceof NotificationSubscription) {
            throw new Exception($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_8fa7086a24cad7" . "c091bc88b5367e5" . "a35"]);
        }
        $this->subscription_list[] = $_1c926d1a6fc7c3a4767e0ae4f217a4fb;
        return true;
    }
    
    
    
    
    
    
    public function Save()
    {
        foreach ($this->subscription_list as $_1c926d1a6fc7c3a4767e0ae4f217a4fb) {
            
            
            if (!$_1c926d1a6fc7c3a4767e0ae4f217a4fb->Save()) {
                return false;
            }
        }
        return true;
    }
    
    
    
    
    
    
    
    public function SetActive($_a69b100d8331e6e08ccd31eabe6d7fcb)
    {
        foreach ($this->subscription_list as $_1c926d1a6fc7c3a4767e0ae4f217a4fb) {
            
            
            if (!$_1c926d1a6fc7c3a4767e0ae4f217a4fb->SetActive($_a69b100d8331e6e08ccd31eabe6d7fcb)) {
                return false;
            }
        }
        return true;
    }
    
    
    
    
    
    
    public function IsAnyActive()
    {
        foreach ($this->subscription_list as $_1c926d1a6fc7c3a4767e0ae4f217a4fb) {
            
            
            if ($_1c926d1a6fc7c3a4767e0ae4f217a4fb->IsActive()) {
                return true;
            }
        }
        return false;
    }
    
    
    
    
    
    
    public function IsAllActive()
    {
        foreach ($this->subscription_list as $_1c926d1a6fc7c3a4767e0ae4f217a4fb) {
            
            
            if (!$_1c926d1a6fc7c3a4767e0ae4f217a4fb->IsActive()) {
                return false;
            }
        }
        return true;
    }
}