rockstardev
rockstardev

Reputation: 13527

Can you use a REST API as a replacement to a conventional DB in YII?

I know YII supports various databases, but with the current project I am working on, YII won't be connecting to conventional database. Checking if a username is valid and even registering a new user is done via a REST API.

As a noob to YII, please help me understand:

  1. Can YII be set up to use my custom rest api?
  2. Will commands like $model->validate() work if it's not really talking to a conventional database?

Any advice would be greatly appreciated.

Upvotes: 1

Views: 504

Answers (1)

Asgaroth
Asgaroth

Reputation: 4334

Yes, there is an active resource extension that serves this purpose. it behaves like conventional active record, but instead of using a relational database it uses a restful end.

Upvotes: 4

Related Questions