Plug-In Interface

The actual accounting functions of the ea-Geier are realized as plug-ins to the base system in a two step process – processing and output.

Processing

code/index.inc.php provides the state machine running the processes of each plug-in.

The current state is defined in the web address either in the long form:

e.g. http://domain/ea/index.php?state=STATE

or in short form

e.g. http://domain/ea/STATE

The input class provides various functions to pass further data as GET or POST variables as well as input validation, etc.

The database class provides various functions for database access.

Data intended for output are stored in the $in object. $in->post and $in->get hold the validated POST and GET variables. $in->error is filled with the codes for validation errors. $in->options is used for all other output information.

The code for the standard plug-ins (cash book, etc.) is separated in two files each.

  • STATE.inc.php holds the code for input validation, data handling, output preparation, etc.
  • STATE.db.php contains the code to access the database.

Output

code/index.html.php provides an additional state machine for the output functionality for the plug-ins.

The output functionality is provided by the smarty class.

The output code for the standard plug-ins (cash book, etc.) is separated into several files each.

  • STATE.html.php holds the actual output code passing the following files to the output engine.
  • STATE.tpl is the template file for the HTML output.
  • STATEprint.tpl is the template file for the print output.
  • STATEcsv.tpl is the template file for the CSV export.
  • STATE.ini is the language file for the template files.