<?php

declare(strict_types=1);

namespace SecurWP\Core;

use SecurWP\Includes\Interfaces\Module as ModuleInterface;

if ( ! defined( 'ABSPATH' ) ) { exit; }


/**
 * Class Module
 *
 * Abstract base class for all modules.
 */
abstract class Module implements ModuleInterface {

    protected string $plugin_name;
    protected string $version;
    protected $loader;

    public function __construct( string $plugin_name, string $version ) {
        $this->plugin_name = $plugin_name;
        $this->version = $version;
    }

    public function initialize( \SecurWP\Includes\Module_Loader $loader ): void {
        $this->loader = $loader;
        $this->run();
    }

    abstract public function run(): void;

    abstract public function get_name(): string;
}
