small template engine
View Single Post
03-25-2010, 12:41 AM
Join Date: Jun 2009
Originally Posted by
Breath between sentences, it'll help us understand the question.
If you don't want to include that class in a separate file, why not copy and paste it into the file you want to use it from? Or as part of another library file in your arsenal?
i have the controller class (which is extended by each controller), the controller is an abstract class with a final function index in there i have a function that is called before anything else from where i check for headers setup header parse each bit of template header body(controller) footer(each of this accept the controller are defined in a config file for templates) and of course before parsing the template files i need to run the parse() function but as i've mentioned i have troubles at this part.
I don't want to add there this two functions and i keep them separated because in the future i might add new things or change things around there.. and i want to keep everything in it's own class not mix up things.
(that function i have in the controller class is called by the router class).
so the flow would be something like this
-> check for headers "parse" the $vars from template load the bits call controller -> method ( i think... i`m kinda of tired in this moment prob my judge is not very good :( )
View Public Profile
Send a private message to fantomel
Find More Posts by fantomel