Developer’s Guide

There are several ways to customize Suma’s existing functionality and extend it to better suit your needs. This Developer’s Guide is a collection of those ways.

The Customization API

Much of Suma’s default behavior can be modified and extended by overriding default method implementations.  The method implementations are found in a file named suma_customization-sample.php that ships with Suma as a plain-text, editable PHP file.  When Suma is operating in a website it will at various points in its execution check to see if these methods are defined and if so invokes them.  This gives you the opportunity to insert your custom logic or custom information into Suma’s processing or have your code be executed at certain times and under certain conditions. The Customization API section of this Guide covers this topic in more detail.

Suma’s Public APIs

In addition to the Customization API mentioned above, some of Suma’s own internal functions are made public (and not obfuscated) so that your code can call into Suma to discover information. The Suma APIs section of this Guide covers this topic in more detail.

A Cookbook of Examples

The cookbook includes some typical examples of how Suma has been or can be extended.  The reason for providing these examples is to help illustrate how Suma can be customized and integrated into different scenarios.  To keep the examples small and uncluttered, some real-world aspects may be left out, and thus you should not treat them as production ready.  Besides, it is the nature of customized code that while you may find these examples a great starting point for developing the customizations you need for a particular purpose, the example will only be the beginning of that customization and not a complete solution on its own.  The Cookbook section of this Guide covers this topic in more detail.