I want to start using Zend_Rest_Controller for my app, and have set up the routing like so in my bootstrap:
protected function _initRestfulRoutes()
{
$front = Zend_Controller_Front::getInstance();
$router = $front->getRouter();
// Specifying all controllers as RESTful:
$restRoute = new Zend_Rest_Route($front);
$router->addRoute('default', $restRoute);
}
However, when using Zend_Navigation, all routes will default to index action. My routes are defined like so:
<users>
<label>Users</label>
<controller>users</controller>
<action>index</action>
<route>default</route>
<pages>
<delete>
<label>Delete Me</label>
<controller>users</controller>
<action>delete</action>
<id>1</id>
<route>default</route>
</delete>
</pages>
</users>
The delete route resolves as http://myapp.com/users
instead of http://myapp.com/users/1?_method=DELETE
Any idea what's going on? Thanks.