CodeIgniter Forums
Reports framework - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34)
+--- Thread: Reports framework (/showthread.php?tid=73666)



Reports framework - MGatner - 05-20-2019

Hi all! I debated whether this one was worth publishing, but since I usually end up adding database reports to just about everything I do and thought someone else might be interested too. It also has an example of module namespace-harvesting (modeled after CI4's own MigrationRunner) that I'm working into a lot of packages.

Tatter\Reports

I will eventually flesh out the docs, tests, examples, and other portions of this project but the framework is all ready to go. Just run:
`composer require tatter/reports`

Reports are each individual classes that live in the Reports folder and namespace of your app or modules. They need a `$table`, a `generate()` method that checks for and processes each result, and a `run()` method to process results for missing metrics. Use the provided interface and base report to flesh out the class:

PHP Code:
use Tatter\Reports\BaseReport;
use 
Tatter\Reports\Interfaces\ReportInterface;
class 
MyReport extends BaseReport implements ReportInterface 

Package info: https://packagist.org/packages/tatter/reports
Code & issues: https://github.com/tattersoftware/codeigniter4-reports

Thanks for reading!


RE: Reports framework - jozefrebjak - 05-17-2021

Will be nice to have some example of report class.


RE: Reports framework - MGatner - 05-17-2021

It is definitely on the list! This module is due for some updates and better docs, though it probably won't be soon - there are a lot more pressing updates ahead of it.