I'm finally getting my head around using the Mapper design pattern to structure an object oriented system I'm building in PHP.
I have classes like User, and Project, each with corresponding MySQL tables (and Mapper classes eg ProjectMapper, UserMapper)
What I want to know, is how to approach link tables while using this pattern. I have another class Invitation which invites a User to work on a Project. (It's just a standard link table, with a project_id and a user_id).
Say I want to get a Collection of all the users assigned to a particular project, firstly, where should this function go? ProjectMapper class, InvitationMapper class?
And secondly. how can I make this neat and sensible?
Thanks in advance.