The Code
Go ahead and download the code for your page navigator, and look it over. Notice that there are considerably more data members than in other classes discussed so far. Names have been chosen in an attempt to make the purpose of the variable explicit, and related variables have been grouped. We'll discuss these variables in the order in which they appear in the class file.
private $pagename;
The variable $pagename is the name of the page that will contain the page navigator control. It could be replaced by $_SERVER['PHP_SELF'], but by using a variable, you can accommodate situations where the Apache module mod_rewrite is being used to rewrite URLs. It's designed to hold a string.
private $totalpages;
$totalpages is a convenient way ...
Get Object-Oriented PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.