0

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.

tereško
  • 58,060
  • 25
  • 98
  • 150
sc4490
  • 11
  • 2

2 Answers2

0

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

secretlm
  • 2,361
  • 2
  • 27
  • 38
0

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

acorncom
  • 5,975
  • 1
  • 19
  • 31