view->escape($item);
}
$list .= '
' . $item . '' . self::EOL;
} else {
if (6 < strlen($list)) {
$list = substr($list, 0, strlen($list) - 6)
. $this->htmlList($item, $ordered, $attribs, $escape) . '' . self::EOL;
} else {
$list .= '' . $this->htmlList($item, $ordered, $attribs, $escape) . '' . self::EOL;
}
}
}
if ($attribs) {
$attribs = $this->_htmlAttribs($attribs);
} else {
$attribs = '';
}
$tag = 'ul';
if ($ordered) {
$tag = 'ol';
}
return '<' . $tag . $attribs . '>' . self::EOL . $list . '' . $tag . '>' . self::EOL;
}
}