Posted by fletch on 04/12/06 12:53
Are you doing a template engine?
We parse <$TEST.TestName.otherparams> and write a cache file which will
contain this instead of the tag:
if($oForObj->Test_TestName($otherparam1,$otherparam2)){
<$TEST.ELSE> is replaced as '} else {'
and <$/TEST> as '}'
$oForObj is set to be the object that displays the template and would
therefore be expected to have the required method.
All the logic then goes into that method, and you can get as
complicated as you like.
I suppose you could do something similar with switch, but we haven't
yet.
Navigation:
[Reply to this message]
|