Re: PEAR report class proposal
| From: | Sebastião Rocha | Date: | Fri, 19 Jul 2002 15:18:07 +0000 |
| Subject: | Re: PEAR report class proposal | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7788@lists.php.net to get a copy of this message | ||
Cópia Alan Knowles <alan@akbkhome.com>:
> I dont see anything wrong with this - although It would be nice to
> restructre the template tree ->
> at present IT/ITX are moving to
> HTML_Template_Integrated ?
Is it? I didnt know. Im changing my work to use as much as PEAR code
as i can. But one thing really bothers me: Every time i start using some
package i finish looking at the version/dir/methods before things work. Not
to mention when you port code from a provider to another. It should be a
BIG help if the PEAR class had some version control, not like cvs, more
like DEB or RPM, and put some messages like
Warning: you need DB.php > 1.8 yours is 1.2 continue at your risk.
I didnt know enough PEAR class to know if is it possible, just my 2 cents...
> Template_Flexy - if no one shouts loudly it's going in :)
> .....
I wont.
>
> BTW - attached is roughly what the reporting stuff looks like in
> DataObjects+Flexy
Hum, didnt get it. I know that we cant do the report with any other
DB/Template pair, it did a lot indeed. The utility of the Report class
appears when you get tired of copy/paste report code from one project
to another.
As i mininal report ( NO pretty print that clients LOVE :) we get:
<?php
...
Use whatever you whant to get to the $results array.
..
$report = new Report($results, $dir, $file);
/**
* Set the titles. NOTE: as many as you need to classify
* the results, just use the right template.
*/
$report->setTitle("title", 0);
$report->setTitle("subtitle", 1);
/**
* Make the report
*/
$report->makeReport();
$report->show();
/**
* At this point you get your lousy/ugly report, and a p*d off client.
* Next time try to use those little beautifier methods the class has ;)
**/
Aside comments, you got 5 lines to copy past to other projects ...
Regards
S. Rocha
-------------------------------------------------
Email enviado pelo webmail.i-node.com.br