Writing a report generator - Programie/TeamPlaner GitHub Wiki
A report generator is an extension which provides a class implementing the iReport interface.
The interface
The class must implement the iReport interface.
setConfig
A method which takes an instance of the Config class providing the configuration read from config.json.
setPDO
A method which takes an instance of the PDO class connected to the database.
create
Called once the report should be created.
This method takes two parameters:
- $year: An integer representing the year of the report
- $month: An integer representing the month of the report
This method should print the generated report (e.g. using "echo").
Configuration
Set the path to the class in reportClass in your config.json (e.g. myextension/Report).