Skip to content

Allow other factories to get services to inject #2

@alexmerlin

Description

@alexmerlin

Dotkernel API needs to create handlers using its own factory and inject dependencies (using setters) instead of getting them through the constructor.
This way handler constructors will not to be pulluted by the same key dependencies in each class.
Instead, hey can inject only those dependencies that they require for the tasks they need to perform.

Additionally, handlers have other dependencies (services, configs etc) that should be injectable through the constructor, as before.

For this, dot-dependency-injection should expose a solution that allows factories to read the dependencies as an array of ready-to-use instances.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions