45 {
46 if(
47 strpos($name, 'isActiveFor') === 0 ||
48 strpos($name, 'setActiveFor') === 0
49 )
50 {
53 $method_parts = explode('_', strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name)));
54 $requested_context = strtolower($method_parts[count($method_parts) - 1]);
55 if(!isset($requested_context, self::$context_map))
56 {
58 }
59
60 if('set' == $method_parts[0])
61 {
62 $settings->set('activate_captcha_anonym_' . $supported_contexts[$requested_context], (int)$arguments[0]);
63 return;
64 }
65 else
66 {
67 return self::checkFreetype() && (bool)$settings->get(
'activate_captcha_anonym_' . $supported_contexts[$requested_context],
false);
68 }
69 }
70 else
71 {
72 throw new BadMethodCallException(
'Call to an undefined static method ' . $name .
' in class ' . __CLASS__ .
'.');
73 }
74 }
static getSupportedContexts()
static checkFreetype()
Check whether captcha support is active.