cakephp/cakephp — pull request #3764 by derekperkins (2014-06-21 14:34:45+00:00)
Title: Add setInput function to CakeRequest

Modify data originally from `php://input`. Useful for altering json/xml data in middleware or DispatcherFilters before it gets to RequestHandlerComponent or other controllers.

My problem is that I'm using friendsofcake/crud which relies on the RequestHandlerComponent. I have a dispatch filter that I want to modify incoming data before Cake processes, which I can do, but RequestHandler goes and reads straight from CakeRequest::input(), and there isn't a way to hook into that. This seems like a good way for someone to intercept data using a filter and input() function, then overwrite CakeRequest::_input which is originally set by _readInput.