zf-fr/zfr-rest — pull request #111 by bakura10 (2013-12-23 22:47:15+00:00)
Title: Dont wrap in paginator

ping @danizord @Ocramius

This PR removes the automatic conversion to Paginator in the router. Instead, the controller now receives exactly what has been matched by the router, so it's up to the user to specify the appropriate type hint (Selectable will be the most useful one I think). Query params filtering can be done directly in the action controller now, this is much more convenient.

Also, the CreateResourceModelListener correctly take into account the return value from the controller. So if you receive a collection, and manually build a paginator from it, the listener will detect the data is not the same (initially a collection, then a paginator), and will therefore create a new resource (reusing the same metadata).

I thing: should we include a utility method in AbstractRestfulController to create a paginator from a collection or is out from our responsibility?