I think I had this discussion with @ocramius and he told me we should not be able to change the resource.

Furthermore you may want to keep the matched resource untouched.

Envoyé de mon iPhone

> Le 24 déc. 2013 à 12:11, Daniel Gimenes <notifications@github.com> a écrit :
> 
> In src/ZfrRest/Mvc/CreateResourceModelListener.php:
> 
> > @@ -65,7 +65,13 @@ public function createResourceModel(MvcEvent $event)
> >              return;
> >          }
> >  
> > -        $model = new ResourceModel($resource);
> > +        // Because we may manipulate the resource data in the controller (for instance wrapping a collection around
> > +        // a paginator), we need to create a new resource from the data
> Why not create a method setData()?
> 
> —
> Reply to this email directly or view it on GitHub.