zf-fr/zfr-rest — pull request #134 by bakura10 (2014-03-08 16:31:06+00:00)
Title: Add a context resource

ping @danizord @Ocramius

This is an attempt to solve #133 . I tried to make it as simple as possible and completely optional. Finally I decided not to automatically inject it into the controller method handlers, but rather only have a context method in the controller, so it can be used even in custom handlers.

Currently, the method is called `getContextResource` so you retrieve a ResourceInterface. I suppose the only use case is actually retrieving the context data (so $this->getContextResource()->getData()). Maybe it should be rename "getContextData"?