I'm using Silex for simple site. I use Doctrine DBAL and that project https://github.com/dflydev/dflydev-doctrine-orm-service-provider as ORM and Entity Manager. I know how access that manger from controller but I wonder how to do that from Model class. For example we have
class UserModel {
public function getPhones() {
????????
}
}
I don't know how to access EntityManager from Model class to find User Phones.
Thanks for advice