File Manager

Current Path : /webspace/www.promiel.be/html/modules/CGExtensions/lib/reports/
Upload File :
Current File : //webspace/www.promiel.be/html/modules/CGExtensions/lib/reports/class.report_generator.php

<?php

namespace CGExtensions\reports;

abstract class report_generator
{
    protected $_report_defn; // \CG\report_defn;

    public function __construct(report_defn $rpt)
    {
        $this->_report_defn = $rpt;
    }

    protected function report()
    {
        return $this->_report_defn;
    }

    protected function start() {}
    protected function finish() {}
    abstract protected function each_row($row);

    public function generate()
    {
        $this->start();
        $rs = $this->report()->get_resultset();
        while( !$rs->EOF ) {
            $this->each_row($rs->fields);
            $rs->MoveNext();
        }
        unset($rs);
        $this->finish();
    }

    abstract public function get_output();
} // end of class

?>

File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com