I have the following scenario:
- My project has an
AppBundlewith aUserentity. - Other bundles add more entities like
Address,Todo,Project,WhatEver. - Those entities must belong to a
Userso that I can call$user->getAddresses(),$user->getTodos(),$user->addProject(),$user->setWhatEvers(). - Those bundles must remain "pluggable" so the
Userentity doesn't necessarily know about them and I can't add those properties liketodosand its getters/setters directly into theUserentity.
I thought about reflection, magic getters/setters, traits as possible aproaches but nothing really fits my needs. Any ideas on how to achieve this?
Aucun commentaire:
Enregistrer un commentaire