Box is a PHP dependency injection container that abstracts project logic relations to make the code more flexible, testable, and maintainable.
Default Arguments
Predefine constructor values for specific parameters of a class. Whenever the container creates an instance, these defaults are automatically applied, reducing boilerplate and ensuring consistent object initialization.
On-Demand Arguments
Provide temporary arguments to override default constructor values. This feature allows you to customize dependencies on the fly without changing the predefined defaults.
Recyclable Instances
Mark classes as shareable so the container instantiates them only once and returns the same object reference for subsequent requests and injections.