In the previous versions of my website I’ve a had a class called Page. The purpose of this class is simply to create a page object which can be customized by adding/removing JS and CSS files as well as including pages through clean URL rules.
This all works fine, but I’m wondering is it really necessary to create an object of the page class? I could do the whole thing with the same results by making an abstract class called Page and changing everything to static (methods and variables) and changing the $this-> variable to self::.
I know this works
, but I’m wondering if this really intelligent thing todo? After all, a instantiated object is most useful for multiple instances and for polymorphism and in this case there can only be ONE page object per page.

The benefit, obviously, would be less RAM usage from the absence of object instantiation.
What do you guys think? This is a true masterpiece isn’t it
In the previous versions of my website I’ve a had a class called Page. The purpose of this class is simply to create a page object which can be customized by adding/removing JS and CSS files as well as including pages through clean URL rules.
This all works fine, but I’m wondering is it really necessary to create an object of the page class? I could do the whole thing with the same results by making an abstract class called Page and changing everything to static (methods and variables) and changing the $this-> variable to self::.
I know this works, but I’m wondering if this really intelligent thing todo? After all, a instantiated object is most useful for multiple instances and for polymorphism and in this case there can only be ONE page object per page.
if (empty($wp)) {
require_once('./wp-config.php');
wp('feed=rdf');
}
require (ABSPATH . WPINC . '/feed-rdf.php');
The benefit, obviously, would be less RAM usage from the absence of object instantiation.