class Helper in Anti Spam by CleanTalk 8.3
Same name in this branch
- 8.3 src/lib/Cleantalk/Common/Helper.php \Drupal\cleantalk\lib\Cleantalk\Common\Helper
- 8.3 src/lib/Cleantalk/ApbctDrupal/Helper.php \Drupal\cleantalk\lib\Cleantalk\ApbctDrupal\Helper
Hierarchy
Expanded class hierarchy of Helper
1 file declares its use of Helper
File
- src/
lib/ Cleantalk/ ApbctDrupal/ Helper.php, line 9
Namespace
Drupal\cleantalk\lib\Cleantalk\ApbctDrupalView source
class Helper extends \Drupal\cleantalk\lib\Cleantalk\Common\Helper {
/*
* Reload original Cleantalk\Common\Helper method
*/
public static function ip_get($ips_input = array(
'real',
'remote_addr',
'x_forwarded_for',
'x_real_ip',
'cloud_flare',
), $v4_only = true) {
// If we need only REAL ip
if (count($ips_input) == 1 && in_array('real', $ips_input) && \Drupal::request() !== null) {
return \Drupal::request()
->getClientIp();
}
else {
return parent::ip_get($ips_input, $v4_only) ? parent::ip_get($ips_input, $v4_only) : '::1';
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Helper:: |
public static | property | ||
Helper:: |
public static | property | ||
Helper:: |
constant | * Default user agent for HTTP requests | ||
Helper:: |
static | function | ||
Helper:: |
public static | function | ||
Helper:: |
static | function | * Check if api key is correct * | |
Helper:: |
public static | function | * Merging arrays without reseting numeric keys * * | |
Helper:: |
static | function | * Setting cookie | |
Helper:: |
public static | function | ||
Helper:: |
public static | function | * Function sends raw http request * * May use 4 presets(combining possible): * get_code - getting only HTTP response code * async - async requests * get - GET-request * ssl - use SSL * * | |
Helper:: |
public static | function |
Overrides Helper:: |
|
Helper:: |
public static | function | ||
Helper:: |
public static | function | ||
Helper:: |
public static | function | ||
Helper:: |
public static | function | * Masks a value with asterisks (*) Needed by the getFieldsAny() * | |
Helper:: |
public static | function | * Print html form for external forms() * | |
Helper:: |
constant | |||
Helper:: |
public static | function | * Valids email * |