Incidentally, in PHP 5 it's not necessary to use =& to assign objects; they're already being passed by reference, so
$cur_row = $table->add_body_row();
$cur_row->add_cell('Row 2 - Col 2');
would do the right thing and the new cell "Row 2 - Col 2" to the new row in $table. Likewise, the & in, e.g.,
public function &add_body_row()
isn't needed.
One thing I'd change about the class is to have add_row() and the like finish by returning $this. Then I can write
$table->add_body_row()->add_cell('Row 2 - Col 2')->add_cell('Row 2 - Col 4',array('rowspan'=>2, 'colspan'=>2));
Oh, and for
$settings = array_diff($settings,array(''));
it would appear that
$settings = array_filter($settings,'strlen');
says what you want a bit more directly.
preg_match('/^#/',$value)
I'd just look at $value[0], myself (doesn't that mean you can't have named colours?).