The Template should have the ability to load the template skin, load the XML Tags, load modules, and output the result.
The Template Factory
I believe that the Template Factory should take the name and then load the skin class, since the template folder is set anyway.
- Constructor: Name of Template
- Load Module
The Load Module function will load in an object that holds the module class code for transforming the skin.
The output function will display the finished contents… as will the destructor if it hasn’t already. It should allow for controlling when the contents are outputted.
XML Tags Classes
There will be one main class, with a few other classes for iterate through the XML tags and replacement. It should simplify things and allow easier creation of other tag classes, while speeding up tag development.
Module factories are loaded and take the contents and replace the xml tag with the results. The Module works by itself and returns the result is a simple way of writing it. It may also implement an Iterator, for buffering. Separating the Modules out for different components allows for easier modification, implementing new features, and use in other development projects.