|Syntactic Confectionery Delight|
as I said, there is legacy code which is using Method Chaining (I didn't design it)
Now the model changed and Person "Willy" can be member of different households
> I have never actually run into a case where an element needed to know its container
I have no idea how method chaining would be implemented else, since ->clean_house() is referring to $house
In the new model case ->get_member() can't return a Person object anymore
One possibility discussed here is to return a Wrapper-Object Inhabitant ° which wraps the relation
'Person ->belongs_ to-> House'
and delegates accordingly.
°) update s/Member/Inhabitant/ for consistency to previous posts
regarding your suggestion, see Re^3: OO Pattern Container x Elements and Method Chaining