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.

Était-ce utile?

La 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

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top