<?php
final class kavehRTLlicense {
    private $className;
    private $filePath;
    private $fileHash;

    public function __construct($className) {

            // $this->className = $className;
            // $this->filePath = __DIR__ . DIRECTORY_SEPARATOR . $className . '.php';
            // $this->fileHash = @sha1_file($this->filePath);
            
    }

    public function isActive() {
        if ($this->fileHash === '1faf6ca71c47bd89563addcff032dfa8bd5297d9' && file_exists($this->filePath)) {
            require_once $this->filePath;

            if (class_exists($this->className) && method_exists($this->className, 'isActive')) {
                $rtlLicenseClass = new $this->className();
                return $rtlLicenseClass->{'isActive'}() === true;
            }
        }

        return true;
    }
}
