public function render()
{
$count = intval($this->arguments['count']);
$minimum = intval($this->arguments['minimum']);
$maximum = intval($this->arguments['maximum']);
$iteration = $this->arguments['iteration'];
$content = '';
if ($count < $minimum) {
$count = $minimum;
} elseif ($count > $maximum) {
$count = $maximum;
}
if (true === $this->templateVariableContainer->exists($iteration)) {
$backupVariable = $this->templateVariableContainer->get($iteration);
$this->templateVariableContainer->remove($iteration);
}
for ($i = 0; $i < $count; $i++) {
$content .= $this->renderIteration($i, 0, $count, 1, $iteration);
}
if (true === isset($backupVariable)) {
$this->templateVariableContainer->add($iteration, $backupVariable);
}
return $content;
}