[ Home ] [ Index ]

Documentation: Plugin Architecture

Introduction

This document details the plugin architecture for the HumpMail project. It is a reference for all developers who choose to write a new plugin for HumpMail.

Architecture

When the web server is started, HumpMail dynamically loads all enabled plugins into memory. Similarly, when the server is stopped, all loaded plugins are deallocated from memory. HumpMail provides an abstract class in which developers are required to extend; namely, HumpMail::Plugin. This class requires the following methods to be implemented:

enable() This method is called automatically by HumpMail when the server is started. The plugin must register its API with the server at this time.
disable() This is an opportunity for the plugin to clean up allocated resources gracefully. For example, releasing open database connections.

Example

sub enable()

$Id: plugin.html,v 1.1 2005/06/07 23:17:37 mcronk Exp $