mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
34 lines
955 B
PHP
34 lines
955 B
PHP
<?php
|
|
|
|
/**
|
|
* Spam Protector base interface. All Protectors should implement this interface
|
|
* to ensure that they contain all the correct methods and we do not get too many
|
|
* odd missing function errors
|
|
*
|
|
* @package SpamProtection
|
|
*/
|
|
|
|
interface SpamProtector {
|
|
|
|
/**
|
|
* Return the name of the Field Associated with this protector
|
|
*/
|
|
public function getFieldName();
|
|
|
|
/**
|
|
* Function required to handle dynamic feedback of the system.
|
|
* if unneeded just return true
|
|
*/
|
|
public function sendFeedback($object = null, $feedback = "");
|
|
|
|
/**
|
|
* Updates the form with the given protection
|
|
*/
|
|
public function updateForm($form, $before = null, $fieldsToSpamServiceMapping = null);
|
|
|
|
/**
|
|
* Set which fields need to be mapped for protection
|
|
*/
|
|
public function setFieldMapping($fieldToPostTitle, $fieldsToPostBody = null, $fieldToAuthorName = null, $fieldToAuthorUrl = null, $fieldToAuthorEmail = null, $fieldToAuthorOpenId = null);
|
|
}
|
|
?>
|