You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, object instantiation is done through a new new $type() closed to the constructor, which requires having setters or public properties outside the constructor.
Therefore, I propose creating an object mapper so that, regardless of where the fields are, the object is correctly rehydrated.
I have started developing a classMapper that takes mappers via a decorator, similar to how the Symfony serializer might work. Would this be suitable? @clementtalleu
The text was updated successfully, but these errors were encountered:
the initial idea was to impose public methods, but this could be a good solution, we just need to make sure we don't degrade performance (there's no reason to).
Another option is to do things like the Doctrine ORM and ODM: bypass the public API of the class, by instantiating without calling the constructor and assigning properties using Reflection, which leaves the public API totally free for the needs of the project itself.
Currently, object instantiation is done through a new
new $type()
closed to the constructor, which requires having setters or public properties outside the constructor.Therefore, I propose creating an object mapper so that, regardless of where the fields are, the object is correctly rehydrated.
I have started developing a classMapper that takes mappers via a decorator, similar to how the Symfony serializer might work. Would this be suitable? @clementtalleu
The text was updated successfully, but these errors were encountered: