<?php

declare(strict_types=1);

namespace SiteFort\Core;

use SiteFort\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( \SiteFort\Includes\Module_Loader $loader ): void {
        $this->loader = $loader;
        $this->run();
    }

    abstract public function run(): void;

    abstract public function get_name(): string;
}
