I am new to PHP and I am trying to create a site for the first time without using the framework (nb, I have nothing against the frameworks, I just think that I need to learn the code from scratch before learning the framework from above This is like learning Javascript before learning jQuery).
I like OOP in concept, so I started there. I think that catching all the script determines what type of page is needed, and then pass the (sanitized) script the input to the class that processes it, where the class is a subclass of the general page class, which includes common methods for handling things like sending HTTP codes and a "virtual" display method for actually displaying the page.
My problem is that it seems that the smell of code happens so much inside the page class itself. Obviously, things like talking to databases, disinfecting input, etc., will be in separate classes, but separate page classes seem huge to contain everything needed to determine the contents of the displayed page.
In addition, I have a small problem that convinces me that there is a need for impersonal methods within any page or its children. I think this is a side effect in my thinking because PHP is a scripting language. Since this is a script, this is non-interactive and the input is determined when the script is run (i.e.POST and GET vars). It seems that without external influences on the page, except for other objects where the page takes data and does not provide it, there is no need for a public method, except, obviously, the constructor and the generate method, which I feel can simply be called from the constructor.
I feel that this is somewhat justifiable, except that I came across this issue , which seems to indicate that private methods do not need unit testing. In my example, this will result in a page class that will only be tested through a single display method, which definitely seems wrong to me.
So tell me: is my design smelly funny? How can I reorganize this into something reasonable?