* * name : foreach name to access it's iterator variables through {$.foreach.name.var} see {@link http://wiki.dwoo.org/index.php/IteratorVariables} for details
* * name : for name to access it's iterator variables through {$.for.name.var} see {@link http://wiki.dwoo.org/index.php/IteratorVariables} for details
* * from : array to iterate from (which equals 0) or a number as a start value
* * to : value to stop iterating at (equals count($array) by default if you set an array in from)
* * step : defines the incrementation of the pointer at each iteration
* * skip : allows you to skip some entries at the start, mostly useless excepted for smarty compatibility
* </pre>
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the use of this software.
...
...
@@ -51,7 +50,6 @@ class Dwoo_Plugin_for extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Bloc
$from=$params['from'];
$name=$params['name'];
$step=$params['step'];
$skip=$params['skip'];
$to=$params['to'];
// evaluates which global variables have to be computed
...
...
@@ -69,11 +67,11 @@ class Dwoo_Plugin_for extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Bloc
"\n".'if (is_numeric($_for'.$cnt.'_from) && !is_numeric($_for'.$cnt.'_to)) { $this->triggerError(\'For requires the <em>to</em> parameter when using a numerical <em>from</em>\'); }';
"\n".'if (is_numeric($_for'.$cnt.'_from) && !is_numeric($_for'.$cnt.'_to)) { $this->triggerError(\'For requires the <em>to</em> parameter when using a numerical <em>from</em>\'); }'.