문제

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.

도움이 되었습니까?

해결책

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top