Want API to work through docrine?
Take a look at https://github.com/doctrine/skeleton-mapper
and an example implementation https://github.com/Coffreo/ceph-odm
Yes, you have to realize some things, but you won't depend on arrived nails formats offer DoctrineRestDriver
But only does this make sense?
If you need to implement a "mixed" entity, for example, you have Product and Product data that are in the API is the ideal solution to implement the loading of data on doctrinism postLoad event.
Desired objects rather than raw data from the API? View in the direction of the same or simonovskogo JMS serializer, which is enough in most cases.
But this is justified in that case, if you really need to put the API under doctrines abstraction...
> What if you do make a small layer with the use of conditional and gazzle in the repositories to make calls?
Found my implementation in real projects - in 99% of cases do. (In some - unfortunately, some fortunately, because it's very easy to maintain)