silverstripe-spamprotection/code/SpamProtectorManager.php

46 lines
1.2 KiB
PHP
Raw Normal View History

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