Skip to content
Garrett W edited this page Jan 21, 2022 · 1 revision

jshannon63/cobalt

Features in brief

  • 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

Principles

  • Fast and small

Configuration details

  • 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.

My opinions

  • Lacks some features

Clone this wiki locally