David, IMHO, XHR has become the predominant way for web apps to execute these additional methods in the browser.
If you really want the old behavior using a query param, it looks like you can attach a dispatch listener to the controller with a higher priority and set the action in the RouteMatch object. Another approach would be to specify the action in child routes; the dispatch should fall back to the behavior of a standard action controller. - pw On Oct 10, 2013, at 7:53 PM, David Muir <[email protected]> wrote: > I'm just starting on a new project where I'm wanting to set up my routes to > work for HTML as well as JSON. > > The AbstractRestfulController seemed like a good idea since it automatically > handles the routing of typical CRUD type actions. What I'm having trouble > with is how to deal with HTML's anaemic HTTP verb support. If I remember > correctly, in ZF1, you could send a request and include a METHOD query param > to route to the non supported verbs, e.g. PUT, DELETE, OPTIONS, HEAD, etc. > Looking through ZF2's AbstractRestfulController source and documentation, it > doesn't look like it supports that hack. Are people only using this > controller for json api's or is there an obvious way to handle it that I'm > missing? > > Apigility looks really interesting, but I don't think it's the right fit > setting up the primary interface. > > Cheers, > David > -- > List: [email protected] > Info: http://framework.zend.com/archives > Unsubscribe: [email protected] > > -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
