Helper for a simple mechanism to dissuade and annoy entry-level spammers. For rigorous protection, use a CAPTCHA. @see Captcha
This is the code documentation for the SproutCMS project
Search documentation |
class SpamHelper for a simple mechanism to dissuade and annoy entry-level spammers. For rigorous protection, use a CAPTCHA. @see Captcha
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2026-09-15
**/
class NewClassName extends Spam {
/**
* Checks text for bad words, like 'tax' and 'capsicum'
**/
public function censor (string $text) {
// Method code goes here
}
/**
* Looks at a block of text to see if it looks like spam.
**/
public function detect (string $text) {
// Method code goes here
}
/**
* Generates a div containing an input which should never be filled in, in order to trap spam bots.
* To be used with {@see Spam::check}
**/
public function glue () {
// Method code goes here
}
/**
* Checks that the spam field was not submitted with the form
**/
public function check () {
// Method code goes here
}
/**
* Checks that the spam field was not submitted with the form
*
* If the check fails the user will be redirected to the URL base ('/') along
* with a notification. Normal users will never encounter this scenario.
**/
public function checkOrDie () {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|