<?php
namespace Claromentis\Documents\Event;

$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] ?: array()) + array("_34652b1c1f3" . "1f242060b920" . "26a1f357a" => base64_decode("RmFpbGVkIHRvIGxvYWQgZm9sZGVyIG9iam" . "VjdA=="), "_b40bd705" . "2d542eec1" . "47133f172" . "46e636" => base64_decode("Qm90aCBmb2xkZXIgb" . "2JqZWN0IGFuZCBmb2" . "xkZXIgaWQgY2Fubm9" . "0IGJlIGVtcHR5"));
use Claromentis\Core\Event\Event;





class FolderContentChangeEvent extends Event
{
    protected $folder_obj, $folder_id;
    
    
    
    
    
    
    
    public function __construct(\ERMSFolder $_3b53e774aaf8b8f3a301e5cb1b2f780f = null, $folder_id = null)
    {
        if (!$folder_id && !$_3b53e774aaf8b8f3a301e5cb1b2f780f) {
            throw new \InvalidArgumentException($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_b40bd7052d542" . "eec147133f1724" . "6e636"]);
        }
        $this->folder_obj = $_3b53e774aaf8b8f3a301e5cb1b2f780f;
        $this->folder_id = $folder_id;
    }
    
    
    
    
    public function GetFolderId()
    {
        if ($this->folder_id) {
            return $this->folder_id;
        }
        return $this->folder_obj->GetId();
    }
    
    
    
    
    
    public function GetFolder()
    {
        if ($this->IsFolderLoaded()) {
            return $this->folder_obj;
        }
        $_a4b4fe29a876bd36f8024f56a625bf4c = new \ERMSFolder();
        if (!$_a4b4fe29a876bd36f8024f56a625bf4c->Load($this->folder_id)) {
            throw new \Exception($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_34652b1c1f31f242060b9" . "2026a1f357a"]);
        }
        $this->folder_obj = $_a4b4fe29a876bd36f8024f56a625bf4c;
        return $this->folder_obj;
    }
    
    
    
    
    public function IsFolderLoaded()
    {
        return $this->folder_obj instanceof \ERMSFolder;
    }
}