code/Extension/FormSpamProtectionExtension.php
public static function get_protector($options = null)
    {
        // generate the spam protector
        if (isset($options['protector'])) {
            $protector = $options['protector'];
        } else {
            $protector = self::config()->get('default_spam_protector');
        }

        if ($protector && class_exists($protector)) {
            return Injector::inst()->create($protector);
        } else {
            return null;
        }
    }
public static function get_protector($options = null)
    {
        // generate the spam protector
        if (isset($options['protector'])) {
            $protector = $options['protector'];
        } else {
            $protector = self::config()->get('default_spam_protector');
        }

        if ($protector && class_exists($protector)) {
            return Injector::inst()->create($protector);
        } else {
            return null;
        }
    }
public static function get_protector ( $ options = null ) { // generate the spam protector if ( isset ( $ options [ 'protector' ] ) ) { $ protector = $ options [ 'protector' ] ; } else { $ protector = self :: config ( ) -> get ( 'default_spam_protector' ) ; } if ( $ protector && class_exists ( $ protector ) ) { return Injector :: inst ( ) -> create ( $ protector ) ; } else { return null ; } }
Instantiate a SpamProtector instance

@param array $options Configuration options
@return SpamProtector|null
Instantiate a SpamProtector instance