composer require weew/commander-container-aware
This package integrates weew/commander with weew/container and allows command handlers to rely on dependency injection and sharing of data trough the container.
Simply create a container aware instance of ICommander
and pass in an instance of IContainer
.
$commander = new Weew\Commander\ContainerAware\Commander(new Container());