Reference ManualsSpamRules_Plugin — An abstract plugin class for the SpamRules host
SpamRules_Plugin is part of the SpamFilter package.
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 );
}
SpamRules_Plugin
An abstract plugin class for the SpamRules host
protected SpamRules $host
The instance of SpamRules this plugin belongs to
public void __construct ( SpamRules &$host );
Constructor. If you override this, don't forget to call parent::__construct as well.
public void after_check ( void );
Post-check clean-up
This function will be called after each check.
public void before_check ( void );
Pre-check initialization
This function will be called before each check.
public void init ( void );
Initialize the plugin
This function will be called after reading all the rules, before the first scan.
public void register_config ( string $config );
Register an attribute as a new config variable
public void register_eval ( string $config,
$method );
Register a method as a new eval function
public void register_rule ( string $method );
Register a method as a new rule