Re: HTML_Table.php

From: Date: Sat, 10 Mar 2001 16:41:54 +0000
Subject: Re: HTML_Table.php
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1780@lists.php.net to get a copy of this message
le 9/03/01 23:32, clayton collie à ccollie@cau.edu a écrit : > Bertrand, > i dont know if you're thinking in this direction, but a useful subclass > would be one tha is populated (attributes included) via user space > callbacks. you can then specialize and grab data from multidimensional > arrays and db's, all from the same code. > as an example, we can have callbacks for table, row, and cell, once we > specify the number of columns we want to create. > > An example follows : Clayton, I see what you mean and I will try to think about it this weekend. At a first glance, the idea seems good. In the code, user's callback methods will have to be overridden (subclassed). My objective is not to make a class like table.inc in PHPlib. The goal of PHPlib's class is more to extract data from a DB and format them in a table.. The problem is that, even if it is using PHPlib DB "wrapper", it does not do the job with Oracle and others. And it is also limited on its layout features. The class I am trying to make should not extract data on its own but data should be passed to it, coming from the outside. In my opinion, its purpose should be more layout oriented. BTW, do you think a method to count rows and columns already created could be useful ? What about a method to alternate row colors ( ex: alternateRowColor ($color1, $color2, $starting_row) ) ? Thank you for your feedback. Bertrand Mansion http://www.tapage.fr

« previous php.pear (#1780) next »