<?php

declare(strict_types=1);

namespace Plugin\tnt_stabila_shop\src\Repositories;

use JTL\Plugin\PluginInterface;
use phpseclib3\Exception\FileNotFoundException;

class FileSystemRepository
{
    protected PluginInterface $plugin;

    /**
     * @var FileSystemRepository
     */
    protected static FileSystemRepository $instance;

    public static function getInstance(): self
    {
        return self::$instance;
    }

    public function getPlugin(): PluginInterface
    {
        return $this->plugin;
    }

    /**
     * FileSystemRepository constructor.
     * @param PluginInterface $plugin
     * @throws FileNotFoundException
     */
    public function __construct(PluginInterface $plugin)
    {
        $this->plugin   = $plugin;
        self::$instance = $this;
    }
}
