title: How should this Class structure be written in php? Composition, Inheritance, Decorator?
body: <p>I have a database where people might simultaneously be employees, customers and members of a company. My adminstration system allows me to edit the properties of the <code>Person</code>, <code>Employee</code>, <code>Customer</code> and <code>Member</code> objects on independent pages.</p>
  
  <p>Now, I'd like to be able to call up an <code>Person</code> but be able to view and edit their employee, customer and member properties on the same page. Creating a view for this scenario is trivial, but I'd like to do it properly with the correct specification of base class, inheritances, compositions and aggregates, etc.</p>
  
  <p>I do understand that the employees, customers and members can't exist without the person, so for my admin page, I'm thinking I should create a new class <code>UberDude</code> that is a <a href="http://en.wikipedia.org/wiki/Object_composition" rel="nofollow">composition</a> of the person, employee, customer and member classes. I would also like to use this new class as part of a collection so that I could draw a table of all persons and see whether they are employees, customers or members. Something doesn't seem right and I can't work out the code for the class structure. Any ideas?</p>