Answer the question
In order to leave comments, you need to log in
Architecture question, how to implement a connector class for an api of a third-party service?
Hello. I have an architecture question. Preferably with an eye on the Onion architecture and some framework, for example yii2.
Let's say there is a need to connect to a third-party api service to process some data. We have the SuperServiceConnector class, which has methods for working with the api of this service. So, to access this service, the key is used, which is given to me when registering for the service, plus the url api. Is this data stored in the database? If in the database, then where and how is it more correct to get access to them? After all, our connector is not ActiveRecord and is not connected to the database. Or it is possible to simply register in separate configs? Type in params to add?
Answer the question
In order to leave comments, you need to log in
onion uses layering with at least three layers:
Domain - your Entity, RepositoryInterface, Service
Application - business logic of the application
Infrastructure - implementation of contracts, drivers, Repository
Допустим есть необходимость коннектиться к стороннему api сервиса для обработки каких-то данных
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question