Добавил unless который противоположен if'у
This commit is contained in:
parent
313413931b
commit
dd95d4aeb0
1 changed files with 2 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ class Klein {
|
|||
["{% for+:id , :id+in+:var %}", "foreach(#3s as #1s => #2s):"],
|
||||
["{% endfor %}", "endforeach;"],
|
||||
["{% if+:var %}", "if(isset(#1s) && #1s):"],
|
||||
["{% unless+:var %}", "if(!(isset(#1s) && #1s)):"],
|
||||
["{% else %}", "else:"],
|
||||
["{% endif %}", "endif;"],
|
||||
["{{ :var }}", "echo #1s;"],
|
||||
|
|
@ -52,4 +53,4 @@ class Klein {
|
|||
eval(" ?>".$this->code."<?php ");
|
||||
return ob_get_clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue