Add this (for current variable in context) fix #5

Signed-off-by: fzerorubigd <fzerorubigd@gmail.com>
This commit is contained in:
fzerorubigd 2013-01-19 15:26:51 +03:30
parent c735de8e5b
commit 3d8685f179
No known key found for this signature in database
GPG Key ID: D6EE858AF9D2999A

View File

@ -130,7 +130,7 @@ class Handlebars_Context
throw new InvalidArgumentException('can not find variable in context');
}
return '';
} elseif ($variableName == '.') {
} elseif ($variableName == '.' || $variableName == 'this') {
return $current;
} else {
$chunks = explode('.', $variableName);
@ -174,4 +174,4 @@ class Handlebars_Context
}
return $value;
}
}
}