Bulleted Lists

The bulleted list consists of an abstract base class and two child classes, OrderedList and UnorderedList.

In order to construct any bulleted list class, you must supply an Clio object, which should be one instance representing the physical terminal.

Markup can be placed in the text to trigger styling embedded in the text.

Lists can be nested by use of the start() and stop() pair. Here is an example of an Unordered List. Note: The HTML class comes with a default markup symbol "**" which means bolding.

    $ul = new UnorderedList($html);

    $ul->start("Unordered List");
    $ul->li("One")->li("Another list item");
    $ul->start()->li("**Second level** of nesting caused")->end();
Unordered List
- One
- Another list item
   - Second level of nesting caused

Software Documentation

The two classes UnorderedList and OrderedList have the same methods as dictated by the abstract base class.

The following sections lists the software documentation for:

Bulleted Class

BulletedList is the abstract base class for UnorderedList and OrderedList, so it should not be used directly.


Constructor for all Bulleted List classes. Pass in the Clio object (which should have one instance to represent the physical terminal).


$html Clio HTML/Clio object


Start a list (either ordered or unordered) for the first level of nesting. It will display introductory text if specified, for the first level of nesting only.

All subsequent calls to start will increase the nesting and the margin accordingly. Use end() to end the current level of nesting. There must be one end for each start called to properly close out the list.

start($text = null)

$text string optional text to start off the list


Display a list item (either ordered or unordered). This text can contain Markup strings to trigger styles within the item.


$text string the text of the list item


End the current ordered or unordered list at the current nesting. There must be one end for every start to close out the list.


UnorderedList Class

This class inherits all of the BulletedList abstract base class.

setBullet (Unordered list only)

Set the bullet string for unordered lists.


$str string bullet string

OrderedList Class

This class inherits all of the BulletedList abstract base class and has no new methods.