RdbAdmin Module

AntiBot
in package

Anti robot class to prevent spam.

Table of Contents

Properties

$defaultHoneypotNames  : null|array<string|int, mixed>
$honeypotNames  : array<string|int, mixed>

Methods

getHoneypotName()  : string
Get the honeypot name.
setAndGetHoneypotName()  : string
Set and get the field name for use in honeypot. To get only, use `getHoneypotName()` method.
staticGetHoneypotName()  : string
Get honeypot name.

Properties

$defaultHoneypotNames

protected null|array<string|int, mixed> $defaultHoneypotNames

The default honeypot names. Leave null means not set yet. This is for in case honeypotNames property was override.

$honeypotNames

protected array<string|int, mixed> $honeypotNames = ['birthdate', 'fullname', 'phonenumber', 'mobilenumber', 'secondary-email', 'national-id']

The honeypot names.

Methods

getHoneypotName()

Get the honeypot name.

public getHoneypotName() : string
Return values
string

setAndGetHoneypotName()

Set and get the field name for use in honeypot. To get only, use `getHoneypotName()` method.

public setAndGetHoneypotName([array<string|int, mixed> $allowedNames = [] ]) : string
Parameters
$allowedNames : array<string|int, mixed> = []

The custom allowed names. If leave empty, it will be use default.

Return values
string

Return generated honeypot name to use. The honeypot name will be set to session $_SESSION['honeypotName']. Use this session to check that honeypot name must be empty.

staticGetHoneypotName()

Get honeypot name.

public static staticGetHoneypotName() : string
Tags
see
getHoneypotName()

Calling to this method as non static.

Return values
string

        
On this page

Search results