silverstripe-spamprotection/code/SpamProtectorField.php

34 lines
773 B
PHP
Raw Normal View History

2009-02-03 22:29:55 +01:00
<?php
/**
* This class acts as a template for spam protecting form field, for instance MollomField.
*
2009-09-14 05:14:58 +02:00
* @package spamprotection
2009-02-03 22:29:55 +01:00
*/
abstract class SpamProtectorField extends FormField {
2009-02-03 22:29:55 +01:00
2009-09-14 05:14:58 +02:00
/**
* Fields to map spam protection too.
*
* @var array
2009-09-14 05:14:58 +02:00
*/
private $spamFieldMapping = array();
2009-02-03 22:29:55 +01:00
/**
* Set the fields to map spam protection too
*
2010-04-12 04:32:44 +02:00
* @param Array array of Field Names, where the indexes of the array are the field names of the form and the values are the field names of the spam/captcha service
*/
public function setFieldMapping($array) {
$this->spamFieldMapping = $array;
2009-02-03 22:29:55 +01:00
}
/**
* Get the fields that are mapped via spam protection
*
* @return Array
2009-02-03 22:29:55 +01:00
*/
public function getFieldMapping() {
return $this->spamFieldMapping;
2009-02-03 22:29:55 +01:00
}
}