json                        json                     
 mapping json to entity                       entity                     
 convert entity to json
server -------------------> client -------------------> server 
------------------------------------> service -----------------------> 
server -----------------------------------> client

Here that the flow you mean
Brian

On Friday, September 5, 2014 5:32:10 PM UTC+7, Jàπ (Jasper N. Brouwer) 
wrote:
>
> I'd say you want that in your service layer. 
>
> I don't known what your architecture looks like, so it's hard for me to 
> say where exaclty you should put it. 
> A simple solotion would be to create a dedicated service, but then you'll 
> have to inject it into your controllers like you say. 
> You could also have a serialize() method in the service you're allready 
> using... 
>
> -- 
> Jasper N. Brouwer 
> (@jaspernbrouwer) 
>
>
> On 5 September 2014 at 12:11:51, Dominik Barann ([email protected] 
> <javascript:>) wrote: 
> > Ok, so i have a serializer class to convert the object. But where should 
> i 
> > do that? I would say in the controller, but then i have to inject the 
> > serializer in every controller where i want to convert an object like 
> that. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to