1 | <?php |
||
16 | class FormSpamProtectionExtension extends Extension |
||
17 | { |
||
18 | /** |
||
19 | * @config |
||
20 | * |
||
21 | * The default spam protector class name to use. Class should implement the |
||
22 | * {@link SpamProtector} interface. |
||
23 | * |
||
24 | * @var string $spam_protector |
||
25 | */ |
||
26 | private static $default_spam_protector; |
||
|
|||
27 | |||
28 | /** |
||
29 | * @config |
||
30 | * |
||
31 | * The {@link enableSpamProtection} method will define which of the form |
||
32 | * values correlates to this form mapped fields list. Totally custom forms |
||
33 | * and subclassed SpamProtector instances are define their own mapping |
||
34 | * |
||
35 | * @var array $mappable_fields |
||
36 | */ |
||
37 | private static $mappable_fields = array( |
||
38 | 'id', |
||
39 | 'title', |
||
40 | 'body', |
||
41 | 'contextUrl', |
||
42 | 'contextTitle', |
||
43 | 'authorName', |
||
44 | 'authorMail', |
||
45 | 'authorUrl', |
||
46 | 'authorIp', |
||
47 | 'authorId' |
||
48 | ); |
||
49 | |||
50 | /** |
||
51 | * @config |
||
52 | * |
||
53 | * The field name to use for the {@link SpamProtector} {@link FormField} |
||
54 | * |
||
55 | * @var string $spam_protector |
||
56 | */ |
||
57 | private static $field_name = "Captcha"; |
||
58 | |||
59 | /** |
||
60 | * Instantiate a SpamProtector instance |
||
61 | * |
||
62 | * @param array $options Configuration options |
||
63 | * @return SpamProtector|null |
||
64 | */ |
||
65 | public static function get_protector($options = null) |
||
80 | |||
81 | /** |
||
82 | * Activates the spam protection module. |
||
83 | * |
||
84 | * @param array $options |
||
85 | * @return Object |
||
86 | */ |
||
87 | public function enableSpamProtection($options = array()) |
||
130 | } |
||
131 |
This check marks private properties in classes that are never used. Those properties can be removed.