I'm setting up a project that consume a number n of APIs. I'm using Guzzle, and in order to reuse it easily later I've decided to wrap it into my own class guzzleWrapper
I have a class mainClass
that handles all the operations and makes the requests that are in common between APIs using guzzleWrapper
but in the same time some API classes need to make some requests that are specific for each so they must be into their own classes.
I would use only one instance of guzzleWrapper
for all classes.
Is it possible ? What desing pattern I should use ? DI ? abstraction ?
Aucun commentaire:
Enregistrer un commentaire