Reputation: 6823
Does anyone have experience implementing an api with Zend framework? I see it's possible to implement index, get, post, put, delete for the api, then implement new and edit actions for the web in the same controller. But is this a good idea? I want to know if this implementation has been tested enough that people don't get problems with it down the road.
Upvotes: 3
Views: 1742
Reputation: 17624
I've had success using the Context Helper to give 'API' access using the same URI structure as the 'normal' site. Then API consumers just have to POST data like a normal form. Depending on the complexity of your needs, that might work for you.
Also, it should be noted that Zend provides a REST router that may be useful.
Upvotes: 3