cvs: pear /HTML_Template_Flexy Flexy.php /HTML_Template_Flexy/Flexy/Compiler/Standard Tag.php
| From: | Alan Knowles | Date: | Wed, 10 Dec 2003 13:21:03 +0000 |
| Subject: | cvs: pear /HTML_Template_Flexy Flexy.php /HTML_Template_Flexy/Flexy/Compiler/Standard Tag.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-14754@lists.php.net to get a copy of this message | ||
alan_k Wed Dec 10 08:21:03 2003 EDT
Modified files:
/pear/HTML_Template_Flexy Flexy.php
/pear/HTML_Template_Flexy/Flexy/Compiler/Standard Tag.php
Log:
add support for flexy:raw="{checked}" which expands into the value of checked
Index: pear/HTML_Template_Flexy/Flexy.php
diff -u pear/HTML_Template_Flexy/Flexy.php:1.51 pear/HTML_Template_Flexy/Flexy.php:1.52
--- pear/HTML_Template_Flexy/Flexy.php:1.51 Tue Nov 25 01:35:43 2003
+++ pear/HTML_Template_Flexy/Flexy.php Wed Dec 10 08:21:02 2003
@@ -55,7 +55,7 @@
*
*
*
-* @version $Id: Flexy.php,v 1.51 2003/11/25 06:35:43 alan_k Exp $
+* @version $Id: Flexy.php,v 1.52 2003/12/10 13:21:02 alan_k Exp $
*/
class HTML_Template_Flexy
{
@@ -77,7 +77,7 @@
// rather than writing to a file.
'filters' => array(), // used by regex compiler..
'numberFormat' =>
",2,'.',','", // default number format = eg. 1,200.00
-
+ 'flexyIgnore' => 0 // turn on/off the tag to
element code
);
@@ -606,4 +606,4 @@
}
-?>
+
Index: pear/HTML_Template_Flexy/Flexy/Compiler/Standard/Tag.php
diff -u pear/HTML_Template_Flexy/Flexy/Compiler/Standard/Tag.php:1.16
pear/HTML_Template_Flexy/Flexy/Compiler/Standard/Tag.php:1.17
--- pear/HTML_Template_Flexy/Flexy/Compiler/Standard/Tag.php:1.16 Thu Dec 4 05:01:05 2003
+++ pear/HTML_Template_Flexy/Flexy/Compiler/Standard/Tag.php Wed Dec 10 08:21:03 2003
@@ -10,7 +10,7 @@
* one instance of these exists for each namespace.
*
*
-* @version $Id: Tag.php,v 1.16 2003/12/04 10:01:05 alan_k Exp $
+* @version $Id: Tag.php,v 1.17 2003/12/10 13:21:03 alan_k Exp $
*/
class HTML_Template_Flexy_Compiler_Standard_Tag {
@@ -125,6 +125,21 @@
foreach ($element->attributes as $k=>$v) {
// if it's a flexy tag ignore it.
+
+ if (strtoupper($k) == 'FLEXY:RAW') {
+ if (!is_object($v)) {
+ PEAR::raiseError(
+ 'flexy:raw only accepts a variable or method call as an argument,
eg.'.
+ ' flexy:raw="{somevalue}" you provided something else.' .
+ " Error on Line {$this->element->line}
<{$this->element->tag}>",
+ null, PEAR_ERROR_DIE);
+ }
+
+ $ret .= ' ' . $v->compile($this->compiler);
+
+
+ }
+
if (strtoupper(substr($k,0,6)) == 'FLEXY:') {
continue;
}
@@ -604,4 +619,4 @@
}
-?>
\ No newline at end of file
+
\ No newline at end of file