Closed cgray closed 10 years ago
Could you please remove the @index
and @key
stuff from _getVariable
method of Template
class? Those won't be required anymore. Also add yourself as author to both files, please.
Removed @index and @key lines from Template::__getVariable
, also added support for quoted literal strings as part of the Context::get
call. Now Parameters that are passed in quoted will be treated as string literal instead of a variable name. Example:
{{#ifEquals message "You've Got Mail"}}<img src='/icons/mail.gif'/>{{/ifEquals}}
Also added Template::parseArguments
as a helper function to ease breaking the argument list property.
The above example will be broken into an array containing:
message
"You've Got Mail"
as opposed to what you would get from a call to implode with space as the delimiter.
Should more closely emulate what happens on handlebars.js
thanks.
Change to allow @key and @index to be resolved within Context::get calls.
For Example to port this javascript helper
Helpers that could accept @key and @index as parameters previously had to implemented like
Can Now be implemented as