Question

I'd like to render a list of results in a view which have been returned from an external API, rather than a database table.

It is possible to create temporary models for the data and display through a data provider?

The data is from Zoopla's API which restricts storing results in a database.

Was it helpful?

Solution

What you are after is known as Active Resource (especially if it is using REST). I would suggest you look at this extension, it does what you need: https://github.com/Haensel/ActiveResource

OTHER TIPS

It is possible to create temporary models for the data and display through a data provider?

Yes, you can do it by using `CModel` or `CFormModel` class

You can see more info about two classes:

http://www.yiiframework.com/doc/api/1.1/CFormModel

http://www.yiiframework.com/doc/api/1.1/CModel

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top