Frage

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.

War es hilfreich?

Lösung

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

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top