mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
parseChain array result support
{$var->func()->func()->props->func().array_key}
This commit is contained in:
parent
7b0dab9247
commit
5dd197ffac
@ -950,6 +950,10 @@ class Template extends Render
|
||||
if ($tokens->is(T_OBJECT_OPERATOR) && $tokens->isNext(T_STRING)) {
|
||||
$code .= '->' . $tokens->next()->getAndNext();
|
||||
}
|
||||
if ($tokens->current() === "." || $tokens->current() === "[") {
|
||||
$code = substr($code, 0, -strlen($tokens->prev[1]));
|
||||
$code .= $this->parseVariable($tokens, $tokens->prev[1]);
|
||||
}
|
||||
} while ($tokens->is('(', T_OBJECT_OPERATOR));
|
||||
|
||||
return $code;
|
||||
|
Loading…
Reference in New Issue
Block a user