Add range support. Tag {for} now deprecated

This commit is contained in:
bzick
2015-02-12 12:13:35 +03:00
parent a9b9c89f88
commit ed860a49cb
10 changed files with 191 additions and 57 deletions

View File

@@ -279,4 +279,15 @@ class Modifier
return "";
}
}
/**
* @param string|int $from
* @param string|int $to
* @param int $step
* @return array
*/
public static function range($from, $to, $step = 1) {
$v = range($from, $to, $step);
return $v ? $v : array();
}
}