I am going to attempt and explain my problem without confusing anyone (no promises).
Ok, so I have a few classes:
I create a building object.
I create a space object.
Then I create a story object (a floor).
I add the space to the story
and I add the story to the building.
Now each space has a set square footage, however, there are times when I might want to combine multiple spaces into a single space or split a single space into multiple spaces.
For example:
I have a floor with Suite 102 and Suite 104. These suites are adjacent and can be combined into a single suite.
OR
I have a floor with a single space (the entire floor) that can be divided into 10 separate suites.
So I guess my problem lies in which class I should create the methods to perform the tasks.
Here's a visual for clarity sake:
Building Object
(
[floors] => Array
(
[0] => Story Object
(
[spaces:Story:private] => Array
(
[0] => Space Object
(
[suite] => 102
[squareFootage] => 1482
[occupant] =>
[divisible] =>
)
[1] => Space Object
(
[suite] => 104
[squareFootage] => 2483
[occupant] =>
[divisible] =>
)
)
)
[1] => Story Object
(
[spaces:Story:private] => Array
(
[0] => Space Object
(
[suite] => 200
[squareFootage] => 3965
[occupant] =>
[divisible] =>
)
)
)
)
)