Model layer with other persistence models

I'm making a system in Phalcon that uses SOAP to do data persistence. In the future, REST can be used to persist the data.

At the moment I tried to use the Phalcon model classes, but I did not get much success, because all are very linked to the Database, because they use the ORM technique.

I wonder if it's possible to use Phalcon's model classes to persist data in this way, or whether I can adapt the classes for this work.

Thank you for your attention.

Can someone help me?

edited May '18

Well, not sure what you are meaning, by default having something in database like written into file it's already persistent. Could you tell us more what you want to achieve? Those models/things you have in database aren't temporar.

Hello @Jurigag

My application communicates with a database, but added another layer using SOAP. This SOAP layer is responsible for doing the read / write process of the database.

Just as Phalcon's model classes exist for direct handling of the database, using ORM, I would like the model class to use other interfaces for data persistence.

I would like to adapt the Phalcon model classes to interact with these interfaces (SOAP or REST) to perform the same process. It is possible?