I need help developing my PHP classes in which I need to move from multiple classes.
I have a generic Pagination.php class that does all kinds of pagination and sorting. All other classes will use this for pagination.
To make my life easier, I created a class generator that generates a class from a MySQL table. All properties, getters, setters and general methods are created automatically, which really saves time and money.
As an example, the Staff_Base class in Staff_Base.php is automatically created from the t_staff SQL table.
Since the Staff_Base class is automatically created from the SQL table, any "custom" methods / properties are in another class that extends Staff_Base.php. (So whenever a new field is added, I can simply restore the Staff_Base class and overwrite it in Staff_Base.php).
So, I have a class Staff.php that extends Staff_Base.php.
The problem is that Staff.php must also extend another Pagination.php class. (The current workaround is to put the methods in Pagination.php in each class. It is really troublesome when I make changes to the pagination / sorting methods.)
How can I do it? What is the best design for this?
, /. , , Pagination.php.
!
uuɐɯǝʃǝs