Re: Flexy patch
| From: | Alan Knowles | Date: | Sat, 17 Apr 2004 10:26:42 +0000 |
| Subject: | Re: Flexy patch | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27831@lists.php.net to get a copy of this message | ||
Thats why getLinks has an argument:
$do->getLinks('links_%s');
I'm not keen to expose supposesed private vars to the engine..
It's an open bug.. - maybe worth adding this to that bug report..
If it does get added, it should really be as a non-default option.. (so this + a check in HTML_Template_Flexy_Token_Var/Method may be needed..
Regards
Alan
Radek Maciaszek wrote:
Hi I've got a little problem with flexy. When I generated entities by data_object: $do->getLinks(); and try to use it in html templates: {foreach:results,key,valueObj}-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com{valueObj._owner_id.first_name}{end:} where _owner_id is genereated by data_object. Flexy doesn't parse {valueObj._owner_id.first_name}. I hack a little and noticed that {val1.val2.val3} works fine but if we try to add "_" before any of the val (for example {val1._val2.val3}) it doesn't work any more. So it is my little hack for it, attached as patch. With this change when I generated new Tokenizer.php it works fine. best regards, Radek ------------------------------------------------------------------------ Index: Tokenizer.lex =================================================================== RCS file: /repository/pear/HTML_Template_Flexy/Flexy/Tokenizer.lex,v retrieving revision 1.43 diff -u -r1.43 Tokenizer.lex --- Tokenizer.lex 15 Apr 2004 03:18:42 -0000 1.43 +++ Tokenizer.lex 17 Apr 2004 08:53:48 -0000 @@ -209,7 +209,7 @@-NAME_START_CHARACTER = ({LCLETTER}|{UCLETTER}) +NAME_START_CHARACTER = ({LCLETTER}|{UCLETTER}|"_") NAME_CHARACTER = ({NAME_START_CHARACTER}|{DIGIT}|{LCNMCHAR}|{UCNMCHAR})NAME_CHARACTER_WITH_NAMESPACE = ({NAME_START_CHARACTER}|{DIGIT}|{LCNMCHAR}|{UCNMCHAR}|":")