<?php

namespace apexl\Io\includes;

use apexl\ClassEngine\EngineSingleton;

class moduleStore extends EngineSingleton
{
    /** @var array<string, Entity[]> */
    protected static array $entities;

    public static function addEntityToStore(string $module, Entity $entity): void
    {
        self::$entities[$module][] = $entity;
    }

    /**
     * @return Entity[]
     */
    public static function getModuleEntities(string $module): array
    {
        return self::$entities[$module] ?? [];
    }
}
