<?php

namespace App\Framework\DI;

interface Container
{
    public MethodInvoker $invoker {get;}

    /**
     * @template T of object
     * @param class-string<T> $class
     * @return T
     */
    public function get(string $class): object;
    public function has(string $class): bool;
    public function bind(string $abstract, callable|string|object $concrete): void;
    public function singleton(string $abstract, callable|string|object $concrete): void;
    public function instance(string $abstract, object $instance): void;
    public function forget(string $class): void;
}
