silverstripe-spamprotection/code/SpamProtectorManager.php

38 lines
1023 B
PHP
Raw Normal View History

2009-02-03 22:29:55 +01:00
<?php
2009-02-03 22:29:55 +01:00
/**
* @package spamprotection
*
* @deprecated 1.0
2009-02-03 22:29:55 +01:00
*/
class SpamProtectorManager {
2009-02-03 22:29:55 +01:00
private static $spam_protector = null;
public static function set_spam_protector($protector) {
Deprecation::notice('1.1',
'SpamProtectorManager::set_spam_protector() is deprecated. '.
'Use the new config system. FormSpamProtectorExtension.default_spam_protector'
);
self::$spam_protector = $protector;
2009-02-03 22:29:55 +01:00
}
public static function get_spam_protector() {
Deprecation::notice('1.1',
'SpamProtectorManager::get_spam_protector() is deprecated'.
'Use the new config system. FormSpamProtectorExtension.default_spam_protector');
return self::$spam_protector;
}
public static function update_form($form, $before = null, $fieldsToSpamServiceMapping = array(), $title = null, $rightTitle = null) {
Deprecation::notice('1.1',
'SpamProtectorManager::update_form is deprecated'.
'Please use $form->enableSpamProtection() for adding spamprotection'
);
return $form->enableSpamProtection();
}
}