Re: Re: HTML_Table: thead, tfoot and tbody

From: Date: Wed, 03 Aug 2005 09:08:44 +0000
Subject: Re: Re: HTML_Table: thead, tfoot and tbody
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-39156@lists.php.net to get a copy of this message
Hi Christian, >> $table->setCellContents(0, 0, '<tbody> row before <thead> row'); >> $table->setHeaderContents(1, 0, '<thead> row after <tbody> >> row'); >> $table->setFooterContents(2, 0, '<tfoot> row before <tbody> >> row'); >> $table->setCellContents(3, 0, '<tbody> row after <tfoot> row'); >> How can this be rendered? When putting row 1 in <thead>, rows 0 and 3 in > > That means: > thead: Row 1 of thead is set, but 0 is not set. Just fill it up? > tbody: Row 0 and Row 3 of tbody are set. How does the class currently > behave? Just fill it up with empty rows? If yes, then it should be so. > tfoot: Row 2 of tfoot is set. Just fill the missing rows up? Hmm, when you interpret those commands this way, then this is a BC break. With the current API in all function mentioned above the first parameter is the row number, relative to the whole table. Especially for <tfoot> this is obvious: It's a big difference whether you do $table->setFooterContents(23, ...) with the current (to be extended) API (meaning: start <tfoot> in row 23) or $table->setFooterContents(0, ...) with you interpretation of the API (meaning to start also at row 23 if the body content ends in row 22). With the first (old) interpretation you would only have to rename "setCellContents" to "setFooterContents" in your code and then you are ready to use the three new groups. With your interpretation you would also have to renumber the row numbers. Mark

« previous php.pear.dev (#39156) next »