<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\DI\Repository;

final class TagRepository
{
    private array $tags = [];

    public function add(string $tag, string $serviceId, array $attributes = []): void
    {
        $this->tags[$tag][$serviceId] = $attributes;
    }

    public function get(string $tag): array { return $this->tags[$tag] ?? []; }
    public function all(): array { return $this->tags; }
}
