[FLOW3-general] Abstract classes and extending objects

Dawid Pacholczyk dpacholczyk at gmail.com
Tue Aug 16 19:02:37 CEST 2011


Hello List,
  I want to talk about one thing.

For example I have 2 objects:
-> Soldier
-> Salesman

They are diffrent persons but they have something in common like name, 
surname, age etc

but also some diffrent thing like for example Soldier have a rank or 
Salesman got salary

Now I would like to create ABSTRACT class Person and create normal 
classes Soldier and Salesman that will extend Person. How can I do that ?

Should I just create normal models (but one as abstract class) and use 
standard adnotations to map object ? How can I extend an object via 
doctrine ?

Best regards,
Dawid Pacholczyk


More information about the FLOW3-general mailing list