Is it possible for doctrine to write your own driver?

Is it possible to write a driver for the doctrine that she was not the data from the database, and how it is rational?
Ie for example I want to work with entities using doctrine, but that doctrine took the old for these entities for example through API of some service, or from elasticsearch or from any other source than from the database
June 14th 19 at 20:27
2 answers
June 14th 19 at 20:29
Can. But, in my opinion, it is better to extract data via the API and stored in a local database, sometimes making a clock (interval time). And doctrine to ispolzovatj already with local database.
Thanks for the reply. Forgot in the description to add that you also need to save the data through API.
But the idea to implement the driver refused. - Kevin.Bosco commented on June 14th 19 at 20:32
In this case, you certainly don't need a driver. By the way, if you do not change the data from the API - mark the appropriate entity attribute "read-only" (@Entity(readOnly=true): - Darien46 commented on June 14th 19 at 20:35
June 14th 19 at 20:31
Which driver?

Quite a repository may return a collection of entities obtained from a third-party API. He doesn't have to be rigidly tied into the doctrine and infrastructure in General. To filter derived entity by Criteria (a La the Specification pattern).

And the General doctrine on the project spread is not good (with) all Boh Rashn SF - fesor

Know more people, which in principle even flush precut to the repository, Yes.
As if in the end all will be well: when we do flush, but can at any time make a request to create an entity in another resource.

Find more questions by tags Doctrine ORM