HomePHP Object Interaction in PHP: Introduction to Aggregation, part 3
Object Interaction in PHP: Introduction to Aggregation, part 3
In the third part of his series, Alejandro Gervasio digs a bit further into object-oriented PHP. He explains the barebones of a paging class and techniques used to aggregate a new “MySQLConnector” class.
Good to hear from you again, dear faithful reader! Welcome to the third part of my series, “Object Interaction in PHP: Introduction to Aggregation.” Have you been playing and tweaking the code for the MySQL abstraction class, presented in the second part? I hope you did!
But, let’s get straight to the point that’s keeping our minds busy. In a progressive way, we’ve introduced the concept of Aggregation in an object-oriented environment, highlighting the immediate benefits of applying it in our applications. Besides, in a worthwhile attempt to lead directly into the development of several classes and make them interact in conjunction, we’ve completed the first half of the cake building our “MySQLConnector” class, in order to work with MySQL, this time using the power of the object-oriented paradigm.
However, it looks like the round is rather incomplete, right? Yes, you’re correct. But, don’t feel disappointed. In this third chapter of the story, we’ll expose the barebones of a paging class, as well as the techniques used to “aggregate” our brand new “MySQLConnector” class inside this structure. Definitively, working with simple yet efficient classes, gives to us the right guidelines to dig deeper in the exciting scenario of object-interaction in PHP.
So, armed with these concepts, it’s time to get our hands a bit dirty, starting out to create the paging class and establish the corresponding interaction between classes. Let’s go!