Цыкл с ключом

This commit is contained in:
Федор Подлеснов 2015-12-03 10:14:09 +03:00
parent a49f10601b
commit 7562f54d2c
3 changed files with 14 additions and 1 deletions

View file

@ -15,6 +15,7 @@ class Klein {
}];
}, [
["{% for+:id+in+:var %}", "foreach(\$#2 as \$index => \$#1): \$loop = ['first' => \$index == 0, 'last' => \$index == count(\$#2) - 1];"],
["{% for+:id , :id+in+:var %}", "foreach(\$#3 as \$#2 => \$#1):"],
["{% endfor %}", "endforeach;"],
["{% if+:var %}", "if(isset(\$#1) && \$#1 ):"],
["{% endif %}", "endif;"],