Skip to content

Create a component factory #40

Description

@ecourtial

In some use case, we might need many instance of the same component (ETL, CSV Extractor...).

So far there is two way to proceed:

  • Use DI. But your constructor could become huge.
  • Use DI + clone. But become difficult to test.

We might consider to create a factory. It would be a class with one public method get(), with two parameters:

  • The classname of the request component
  • The optionnal array of the options

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions