Enumerations and numberings can be added to table cells and sections. They can be nested.
Enumeration example:
<?php
// first level enumeration
$enum = new PHPRtfLite_List_Enumeration($rtf);
$enum->addItem('hello world');
$enum->addItem('foo');
$enum->addItem('bar');
// second level enumeration
$subEnum = new PHPRtfLite_List_Enumeration($rtf);
$subEnum->addItem('hello world');
$subEnum->addItem('foo');
$subEnum->addItem('bar');
$enum->addList($subEnum);
$section = $rtf->addSection();
// add enumeration to a section
$section->addList($enum);
For enumerations the following types are supported:
The bullet character are the default character for enumerations.
Numbering example:
<?php
// first level numbering
$numList = new PHPRtfLite_List_Numbering($rtf);
$numList->addItem('hello world');
$numList->addItem('foo');
$numList->addItem('bar');
// second level numbering
$subNumList = new PHPRtfLite_List_Numbering($rtf);
$subNumList->addItem('hello world');
$subNumList->addItem('foo');
$subNumList->addItem('bar');
$numList->addList($subNumList);
// add item in the first level
$numList->addItem('foobar');
$section = $rtf->addSection();
// add numbering to a section
$section->addList($numList);
For numberings the following types are supported:
Arabic numbering is the default type.