cvs: pear /HTML_Template_Flexy/Flexy Tokenizer.lex Tokenizer.php /HTML_Template_Flexy/Flexy/Compiler Standard.php /HTML_Template_Flexy/examples
example.html example.html.en.php example.result.html

From: Date: Wed, 21 Jan 2004 08:57:20 +0000
Subject: cvs: pear /HTML_Template_Flexy/Flexy Tokenizer.lex Tokenizer.php /HTML_Template_Flexy/Flexy/Compiler Standard.php /HTML_Template_Flexy/examples
example.html example.html.en.php example.result.html
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-15834@lists.php.net to get a copy of this message
alan_k Wed Jan 21 03:57:20 2004 EDT Modified files: /pear/HTML_Template_Flexy/Flexy Tokenizer.lex Tokenizer.php /pear/HTML_Template_Flexy/Flexy/Compiler Standard.php /pear/HTML_Template_Flexy/examples example.html example.html.en.php example.result.html Log: fix flexy method argument bug - spotted by demian http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/Flexy/Tokenizer.lex?r1=1.37&r2=1.38&ty=u Index: pear/HTML_Template_Flexy/Flexy/Tokenizer.lex diff -u pear/HTML_Template_Flexy/Flexy/Tokenizer.lex:1.37 pear/HTML_Template_Flexy/Flexy/Tokenizer.lex:1.38 --- pear/HTML_Template_Flexy/Flexy/Tokenizer.lex:1.37 Tue Dec 9 21:26:40 2003 +++ pear/HTML_Template_Flexy/Flexy/Tokenizer.lex Wed Jan 21 03:57:19 2004 @@ -16,7 +16,7 @@ // | Authors: nobody <nobody@localhost> | // +----------------------------------------------------------------------+ // -// $Id: Tokenizer.lex,v 1.37 2003/12/10 02:26:40 alan_k Exp $ +// $Id: Tokenizer.lex,v 1.38 2004/01/21 08:57:19 alan_k Exp $ // // The Source Lex file. (Tokenizer.lex) and the Generated one (Tokenizer.php) // You should always work with the .lex file and generate by @@ -982,8 +982,8 @@ <IN_FLEXYMETHODQUOTED>{FLEXY_VAR} { - $t = substr($this->yytext(),0,-1); - + + $t = $this->yytext(); // add argument $this->flexyArgs[] = $t; $this->yybegin(IN_FLEXYMETHODQUOTED_END); http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/Flexy/Tokenizer.php?r1=1.37&r2=1.38&ty=u Index: pear/HTML_Template_Flexy/Flexy/Tokenizer.php diff -u pear/HTML_Template_Flexy/Flexy/Tokenizer.php:1.37 pear/HTML_Template_Flexy/Flexy/Tokenizer.php:1.38 --- pear/HTML_Template_Flexy/Flexy/Tokenizer.php:1.37 Tue Dec 9 21:26:40 2003 +++ pear/HTML_Template_Flexy/Flexy/Tokenizer.php Wed Jan 21 03:57:19 2004 @@ -16,7 +16,7 @@ // | Authors: nobody <nobody@localhost> | // +----------------------------------------------------------------------+ // -// $Id: Tokenizer.php,v 1.37 2003/12/10 02:26:40 alan_k Exp $ +// $Id: Tokenizer.php,v 1.38 2004/01/21 08:57:19 alan_k Exp $ // // The Source Lex file. (Tokenizer.lex) and the Generated one (Tokenizer.php) // You should always work with the .lex file and generate by @@ -3164,7 +3164,7 @@ } case 70: { - $t = substr($this->yytext(),0,-1); + $t = $this->yytext(); // add argument $this->flexyArgs[] = $t; $this->yybegin(IN_FLEXYMETHODQUOTED_END); @@ -3409,7 +3409,7 @@ } case 107: { - $t = substr($this->yytext(),0,-1); + $t = $this->yytext(); // add argument $this->flexyArgs[] = $t; $this->yybegin(IN_FLEXYMETHODQUOTED_END); @@ -3463,7 +3463,7 @@ } case 117: { - $t = substr($this->yytext(),0,-1); + $t = $this->yytext(); // add argument $this->flexyArgs[] = $t; $this->yybegin(IN_FLEXYMETHODQUOTED_END); @@ -3532,7 +3532,7 @@ } case 285: { - $t = substr($this->yytext(),0,-1); + $t = $this->yytext(); // add argument $this->flexyArgs[] = $t; $this->yybegin(IN_FLEXYMETHODQUOTED_END); http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/Flexy/Compiler/Standard.php?r1=1.9&r2=1.10&ty=u Index: pear/HTML_Template_Flexy/Flexy/Compiler/Standard.php diff -u pear/HTML_Template_Flexy/Flexy/Compiler/Standard.php:1.9 pear/HTML_Template_Flexy/Flexy/Compiler/Standard.php:1.10 --- pear/HTML_Template_Flexy/Flexy/Compiler/Standard.php:1.9 Sat Jan 10 05:07:07 2004 +++ pear/HTML_Template_Flexy/Flexy/Compiler/Standard.php Wed Jan 21 03:57:19 2004 @@ -16,7 +16,7 @@ // | Authors: Alan Knowles <alan@akbkhome.com> | // +----------------------------------------------------------------------+ // -// $Id: Standard.php,v 1.9 2004/01/10 10:07:07 alan_k Exp $ +// $Id: Standard.php,v 1.10 2004/01/21 08:57:19 alan_k Exp $ // // Base Compiler Class // Standard 'Original Flavour' Flexy compiler @@ -415,6 +415,8 @@ $ret .= $element->toVar($element->method) . "("; $s =0; + + foreach($element->args as $a) { if ($s) { http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/examples/example.html?r1=1.23&r2=1.24&ty=u Index: pear/HTML_Template_Flexy/examples/example.html diff -u pear/HTML_Template_Flexy/examples/example.html:1.23 pear/HTML_Template_Flexy/examples/example.html:1.24 --- pear/HTML_Template_Flexy/examples/example.html:1.23 Tue Jan 20 02:15:52 2004 +++ pear/HTML_Template_Flexy/examples/example.html Wed Jan 21 03:57:20 2004 @@ -96,6 +96,13 @@ <img src="%7bgetImageDir()}/someimage.jpg"> <img src="{getImageDir()%7D/someimage.jpg"> + + +<span class="{t.getBgnd(valueArr[isConfigurable])}"></span> + + + + <H2>Conditions</H2> <p>a condition {if:condition} hello {else:} world {end:}</p> @@ -182,6 +189,9 @@ {end:} + + + <p>HTML tags example using foreach=&quot;loop,a&quot; or the tr</p> <table width="100%" border="0"> <tr flexy:foreach="loop,a" class="{a.hightlight}"> http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/examples/example.html.en.php?r1=1.22&r2=1.23&ty=u Index: pear/HTML_Template_Flexy/examples/example.html.en.php diff -u pear/HTML_Template_Flexy/examples/example.html.en.php:1.22 pear/HTML_Template_Flexy/examples/example.html.en.php:1.23 --- pear/HTML_Template_Flexy/examples/example.html.en.php:1.22 Tue Jan 20 02:15:52 2004 +++ pear/HTML_Template_Flexy/examples/example.html.en.php Wed Jan 21 03:57:20 2004 @@ -100,6 +100,13 @@ <img src="<?php if (isset($t) && method_exists($t,'getImageDir')) echo htmlspecialchars($t->getImageDir());?>/someimage.jpg"> <img src="<?php if (isset($t) && method_exists($t,'getImageDir')) echo htmlspecialchars($t->getImageDir());?>/someimage.jpg"> + + +<span class="<?php if (isset($t) && method_exists($t,'getBgnd')) echo htmlspecialchars($t->getBgnd($t->valueArr['isConfigurable']));?>"></span> + + + + <H2>Conditions</H2> <p>a condition <?php if ($t->condition) {?> hello <?php } else {?> world <?php }?></p> @@ -186,6 +193,9 @@ <?php }?> + + + <p>HTML tags example using foreach=&quot;loop,a&quot; or the tr</p> <table width="100%" border="0"> <?php if (is_array($t->loop) || is_object($t->loop)) foreach($t->loop as $a) {?><tr class="<?php echo htmlspecialchars($a->hightlight);?>"> http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/examples/example.result.html?r1=1.3&r2=1.4&ty=u Index: pear/HTML_Template_Flexy/examples/example.result.html diff -u pear/HTML_Template_Flexy/examples/example.result.html:1.3 pear/HTML_Template_Flexy/examples/example.result.html:1.4 --- pear/HTML_Template_Flexy/examples/example.result.html:1.3 Tue Jan 20 02:15:52 2004 +++ pear/HTML_Template_Flexy/examples/example.result.html Wed Jan 21 03:57:20 2004 @@ -93,6 +93,13 @@ <img src="/someimage.jpg"> <img src="/someimage.jpg"> + + +<span class=""></span> + + + + <H2>Conditions</H2> <p>a condition world </p> @@ -142,6 +149,9 @@ # + + + <p>HTML tags example using foreach=&quot;loop,a&quot; or the tr</p> <table width="100%" border="0"> </table>

« previous php.pear.cvs (#15834) next »