Reference Manuals

SpamRules_Plugin

SpamRules_Plugin — An abstract plugin class for the SpamRules host

SpamRules_Plugin is part of the SpamFilter package.

Synopsis

class SpamRules_Plugin {
        protected      SpamRules           $host

        public         void                __construct               ( SpamRules &$host );
        public         void                after_check               ( void );
        public         void                before_check              ( void );
        public         void                init                      ( void );
        public         void                register_config           ( string $config );
        public         void                register_eval             ( string $config,
                                                                        $method );
        public         void                register_rule             ( string $method );
}

Object Hierarchy

SpamRules_Plugin

Description

An abstract plugin class for the SpamRules host

Attribute Details

$host

protected      SpamRules      $host

The instance of SpamRules this plugin belongs to

Method Details

__construct()

public         void           __construct               ( SpamRules &$host );

Constructor. If you override this, don't forget to call parent::__construct as well.

&$host
The instance of SpamRules this plugin belongs to

after_check()

public         void           after_check               ( void );

Post-check clean-up

This function will be called after each check.


before_check()

public         void           before_check              ( void );

Pre-check initialization

This function will be called before each check.


init()

public         void           init                      ( void );

Initialize the plugin

This function will be called after reading all the rules, before the first scan.


register_config()

public         void           register_config           ( string $config );

Register an attribute as a new config variable

$config
The attribute to register

register_eval()

public         void           register_eval             ( string $config,
                                                           $method );

Register a method as a new eval function

$config
The method to register
$method

register_rule()

public         void           register_rule             ( string $method );

Register a method as a new rule

$method
The method to register