<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\DI\Contracts;

interface ContainerInterface
{
    public function has(string $id): bool;
    public function get(string $id): mixed;
    public function make(string $id): mixed;

    public function register(string $id, ?string $className = null): RegistrationInterface;
    public function singleton(string $id, ?string $className = null): RegistrationInterface;
    public function scoped(string $id, ?string $className = null): RegistrationInterface;
    public function prototype(string $id, ?string $className = null): RegistrationInterface;
    public function factory(string $id, callable $factory): RegistrationInterface;
    public function instance(string $id, object $instance): RegistrationInterface;
    public function value(string $id, mixed $value): RegistrationInterface;
    public function alias(string $alias, string $target): void;

    public function tagged(string $tag): array;
    public function definitions(): array;
}
