Mam cos takiego:
Kod
Page
|
+-- SectionsList
|
+-- Section
|
+-- QuestionsList
|
+-- Question
|
+-- AnswersList
|
+-- Answer
|
+-- SectionsList
|
+-- Section
|
+-- QuestionsList
|
+-- Question
|
+-- AnswersList
|
+-- Answer
To jest drzewko zaleznosci klas - np. SectionsList "zawiera sie" w Page i posiada liste obiektow Section. Zkolei Section posiada QuestionsList, ktora ma liste obiektow Question itd.
Teraz zastanawiam sie czy jest sens tworzyc klasy (kolekcje) *List czy moze lepiej zaimplementowac metody obslugi takiej listy na poziomie klasy w ktorej znajdowac sie bedzie obiekt *List.
Czyli np w Page dodac metody takie jak GetNextSection itp. zamist robic $Page->SectionsList->GetNext();
?