Answer the question
In order to leave comments, you need to log in
php methods parameter identification?
Hello. There is a template engine skn . Briefly describe its work - it has compl methods (collects [% tag%] tags in the html template and assigns values to them) and a load method that loads the html file into a string for further processing. This template engine suits me perfectly, but there was a need to identify compl methods .
For example, if we take one of the module classes of my cms, - Main. There are three compl methods here that need to be identified and somehow passed a third parameter identical to the name of the parameter from the load('main.tpl');
That is, it should be like this:
$this->skn->compl('[%info%]', 'INFORM', 'main.tpl');
$this->skn->compl('[%content%]', 'CONTENT', 'main.tpl');
$this->skn->compl('[%footer%]', 'FOOTER. 'main.tpl');
You can write this third parameter manually, but if there are dozens or more of such compl methods and 'main.tpl' needs to be constantly added and repeated, it's not right to wake up.
Question: How can compl methods be passed a third parameter identical to the name of the load('main.tpl') method parameter, which, in addition, is executed at the very end after all compl ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question