Hi Grégoire,
Thanks for the reply. Here is my situation.
My mission consists to rewrite a Web application with Symfony2 and Pomm. In a first time, the old (Legacy) and the new application will live together, and we try to reuse some logic of the Legacy application in the new application (with pseudo webservices calls).
In order to do that, I've created a Legacy Service. This service is able to call old pieces of code of the Legacy application.
Here is an example of the process that I would like to have :
- The controller load a HumanMap (instance of BaseObjectMap)
- The HumanMap is used to get a Collection of Humans. Let's say that each Human has a picture attribute.
- The human Collection is transmitted to the view, that will try to get access to picture thumbnails.
The legacy framework contains the method and the logic to locate or generate thumbnail pictures.
I would like to create a method called getThumbnails() in my Humain class, that would rely on this Legacy method, so I need to have access to my Legacy Service inside my Human Class.
Because access to Human Objects is often made in differents Controllers, I would like to avoid repeated pieces of code in my Controllers (load Human, inject Legacy Service).
Thank you for your help, if you have any :)
Nicolas.
--
Nicolas Potier ACSEO - Conseil, Innovation, Expertise en Nouvelles Technologies