You can have another layer of business logic classes that you store in
lib/ which interact with your
models directly.

    gabriel

On Oct 6, 7:24 am, "Sebastien Armand [Pink]" <[email protected]> wrote:
> Most of the times in symfony applications, we'll have a model let's say it's
> 'Product' and then many interactions that I don't think belong to the model
> part of the application still would be really convenient if you could write
> them as $myModel->doThis()
>
> The kind of interaction I'm thinking about are more 'application' level.
> For example I'll usually have a link to a page where this product is
> displayed, and instead of having to write the url_for ('product_route',
> $myProduct), it seems to me much more natural if I could write something
> like $myProduct->getUrl().
> Same thing for removing bits of cache related to this product, it seems
> correct in a way to write $myProduct->removeCachedElements(); or something
> like this.
>
> However those interactions as I see them don't belong to the model, they are
> much more linked with a higher presentational or web level of interaction.
>
> Just wondering how other people do things this way or not?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to