I'm using MongoDB Doctrine ODM on a Symfony 2 project. In the documents classes the mapping metadata are specified by annotations. For example:
/**
* @MongoDB\Document(collection="statistiche")
*/
The collection name in this way is hardcoded. I want to have dynamical collection name parameter, that can be readed from global parameters.yml Symfony file (and, consequently, can be configured by user). How can I perform this goal? Thanks.