doctrine2 - How should Symfony projects implement UML2 class interfaces in its entity classes? -


after reading around how build uml class diagrams , using solid principles, i've tried putting uml class diagram i'm happy new symfony project i'm going start.

however, interfaces i've defined - example:

example uml class diagram interface

i'm unclear if/how should implemented symfony abstract entities. i've read there seems conflicting opinions:

  1. symfony docs: how define relationships abstract classes , interfaces , seems when accessing abstract classes other bundles?

  2. questions such this people advise against using abstract classes , isntead create 'normal' entities (ie professor , student) - although isn't disregarding benefits of solid?

you should @ inheritance mapping section of doctrine documentation... allows have abstract "person" class , extend make "student" or "teacher" there couple of different ways can pull off... simplest of single_table inheritance, uses "discriminator" in database know type of entity is.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -