<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\DI\Repository;

final class AliasRepository
{
    private array $aliases = [];

    public function add(string $alias, string $target): void { $this->aliases[$alias] = $target; }
    public function has(string $alias): bool { return isset($this->aliases[$alias]); }
    public function resolve(string $id): string { return $this->aliases[$id] ?? $id; }
    public function all(): array { return $this->aliases; }
}
