I have referred many articles in the web on this subject but got only basic examples. I got some practical issues.
1). In Zend_Rest_Controller there are abstract methods for get, post, put and delete. how do I create my own function rather thean using getAction, postAction, etc... in order to respond for a get request (Ex: api.abc.com/product/5 - That will return set of products from a category 5)?
2). Is it possible to enable rest routing only for a specific controller in a module?
Can you give some example or some article?
I will try to answer this, since I've created an API using
Zend_Rest_Controller, but since the project is not public, i can only copy-paste so much.1) Well you should use these methods. They are helpful in that they kind of force you to think in terms of every controller being a resource. So for each resource you should only be able to define the GET verb once.
2) Well out of the box - I think no. But that should not be a bad thing, since you should put all of the rest functionality in a seperate module anyways.