DevShed.com has two new article posted with some insight into how objects interact in PHP - Part 1 and Part 2.
In part 1:
Composition is an important concept in PHP. It occurs when an object creates another object; that is, the first object completely possesses the second object. In this article (the first of two parts), Alejandro Gervasio explains composition, and shows some examples to illustrate his points.
And, in part 2:
In the first article of this series, the concept of composition in object-oriented programming was explained, and illustrated with an example that implemented composition using two simple classes. In this article, we will create a MySQL database wrapping class that uses the concept of composition.
They introduce the concept of composition in the first part, explaining what good composition is like, an example and how to work with it. Part 2 gets into more detail, showing you how to create the MySQL class with the theories laid out in Part 1...




