-
Notifications
You must be signed in to change notification settings - Fork 1
Cobalt
Garrett W edited this page Jan 21, 2022
·
1 revision
- Auto-wiring
- PSR-11 compliant
- ArrayAccess for bind/resolve
- Inject existing instances into container
- Can share all instances via container instantiation configuration
- Substitutions; supports closures as a delegation
- Fast and small
- bind() gives the container a definition which consists of a class, class substitution, closure delegation, or existing object.
- resolve()/get() creates a desired object if the binding exists.
- make() binds and immediately resolves, returning a constructed object.
- alias() assigns an arbitrary name to a binding the container already has.
- Lacks some features