Update Context::get to resolve @key and @index

This commit is contained in:
cgray 2014-01-16 12:41:02 -06:00
parent 0f65f12db3
commit 1119784549

View File

@ -219,6 +219,10 @@ class Context
return '';
} elseif ($variableName == '.' || $variableName == 'this') {
return $current;
} elseif ($variableName == '@index') {
$current = $this->lastIndex();
} elseif ($variableName == '@key') {
$current = $this->lastKey();
} else {
$chunks = explode('.', $variableName);
foreach ($chunks as $chunk) {