Captcha util.
More...
◆ __callStatic()
static ilCaptchaUtil::__callStatic |
( |
|
$name, |
|
|
array |
$arguments = array() |
|
) |
| |
|
static |
- Parameters
-
string | $name | |
array | $arguments | |
- Returns
- bool
- Exceptions
-
Definition at line 43 of file class.ilCaptchaUtil.php.
References $DIC, $lng, and $name.
46 strpos(
$name,
'isActiveFor') === 0 ||
47 strpos(
$name,
'setActiveFor') === 0
50 $supported_contexts = self::getSupportedContexts();
51 $method_parts = explode(
'_', strtolower(preg_replace(
'/([a-z])([A-Z])/',
'$1_$2',
$name)));
52 $requested_context = strtolower($method_parts[count($method_parts) - 1]);
53 if (!isset($requested_context, self::$context_map)) {
57 if (
'set' == $method_parts[0]) {
58 $settings->set(
'activate_captcha_anonym_' . $supported_contexts[$requested_context], (
int) $arguments[0]);
61 return self::checkFreetype() && (bool) $settings->get(
'activate_captcha_anonym_' . $supported_contexts[$requested_context],
false);
◆ checkFreetype()
static ilCaptchaUtil::checkFreetype |
( |
| ) |
|
|
static |
◆ getSupportedContexts()
static ilCaptchaUtil::getSupportedContexts |
( |
| ) |
|
|
staticprivate |
- Returns
- array
Definition at line 87 of file class.ilCaptchaUtil.php.
References $name, $r, and array.
89 if (null !== self::$context_map) {
90 return self::$context_map;
93 self::$context_map =
array();
96 $constants =
$r->getConstants();
97 foreach ($constants as
$name => $value) {
98 if (strpos(
$name,
'CONTEXT_') === 0) {
99 self::$context_map[strtolower(substr(
$name, strlen(
'CONTEXT_')))] = $value;
103 return self::$context_map;
Create styles array
The data for the language used.
◆ $context_map
ilCaptchaUtil::$context_map |
|
staticprotected |
◆ CONTEXT_FORUM
const ilCaptchaUtil::CONTEXT_FORUM = 'frm' |
◆ CONTEXT_LOGIN
const ilCaptchaUtil::CONTEXT_LOGIN = 'auth' |
◆ CONTEXT_REGISTRATION
const ilCaptchaUtil::CONTEXT_REGISTRATION = 'reg' |
◆ CONTEXT_WIKI
const ilCaptchaUtil::CONTEXT_WIKI = 'wiki' |
The documentation for this class was generated from the following file: