Hi,
short: I want to figure out which construct is best suited to store nested values in a template class.
background: For my website, I have a template class, that provides my output class with the necessary files (filenames, resp.) which to include/process.
example: for a given site ("sample.php ") I instantiate the template and feed it to my output class
the necessary files for that are static html includes, xml files, xsl files and their parameters, so the Template class will have to provide these ones according to the wantet template (in this case it's the "sample" template). Currently the HTMLoutput function uses the template in several of its methods (e.g. writeContent(), writeNavi(),... ) so I need the files depending on template and method. furthermore, if I use xml I need a set of files (namely xml, xsl and parameter (xml → xhtml)). this would map to a threedimensiona l table.
question now: how do I best fit such a "table" in my template class?
possible solutions (I can think of):
- threedimensiona l array (urgh, there should be better ways)
- one or more MySQL tables (there are currently not so many values (~ 20), overkill?)
- an object (currently I have no idea how such an object should look like)
- a configuration file
any ideas how to solve this are highly appreciated
thanks in advance,
Dormi
PS: I'm using Apache & PHP 5.2.6
short: I want to figure out which construct is best suited to store nested values in a template class.
background: For my website, I have a template class, that provides my output class with the necessary files (filenames, resp.) which to include/process.
example: for a given site ("sample.php ") I instantiate the template and feed it to my output class
Code:
$currentTemplate = new Template("sample");
$sample = new HTMLoutput($currentTemplate);
// some code
$sample->writeContent();
// some other code
question now: how do I best fit such a "table" in my template class?
possible solutions (I can think of):
- threedimensiona l array (urgh, there should be better ways)
- one or more MySQL tables (there are currently not so many values (~ 20), overkill?)
- an object (currently I have no idea how such an object should look like)
- a configuration file
any ideas how to solve this are highly appreciated
thanks in advance,
Dormi
PS: I'm using Apache & PHP 5.2.6
Comment