Jonas Delfs wrote:
Hi -
I have the following suggestions for the Table-class:
- methods get*Attributes() should be implemented
- it should be legal to give addRow() and addCol() an multidimensional array
as 2. argument, like this:
$table->addRow(array('cellOne', 'cellTwo'), array(array('bgcolor' =>
'#000000'), array('bgcolor' => '#FFFFFF')));
And then the first cell should have a black backgroundcolor, and the second
a white.
I agree with the implementation of getAttributes. If you can do it, it's great.
About addRow, how would you handle two arrays with different sizes. Ex :
$table->addRow(array('cellOne', 'cellTwo', 'cellThree'), array(array('bgcolor'=>'#000000'), array('bgcolor'=>'#FFFFFF')));
This is very important as most of the time, users don't know how many rows will be displayed as result can come from a database.
At the moment, there is an altRowAttributes method that can handle alternative row attributes to do this on odd and even rows.
Please, post your suggestions to the list before commit. Thanks for your time.
Bertrand Mansion
Mamasam