Checks if a dependency token is registered in the container.
The unique identifier for the dependency.
true if the token is registered, false otherwise.
Retrieves a list of all registered dependency tokens.
An array of all registered tokens.
Clears all registered dependencies and resets the resolution stack.
StaticgetRetrieves the global singleton instance of the container.
Creates a new instance if none exists.
The global DIContainer instance.
A lightweight Dependency Injection container.
Supports registering dependencies as singletons or transients and includes built-in detection for circular dependencies.
Example