VuFind API Documentation

Image extends LaminasBase
in package

Image CAPTCHA.

Tags
category

VuFind

author

Mario Trojan mario.trojan@uni-tuebingen.de

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$cacheBasePath  : string
Base path of cache where image will be stored, e.g. /vufind/cache/
$captcha  : AbstractWord
Laminas CAPTCHA object
$captchaHtmlInputId  : string
HTML input name for user input
$captchaHtmlInternalId  : string
HTML input name for generated captcha
__construct()  : mixed
Constructor
getCacheBasePath()  : string
Getter for template
getCaptcha()  : AbstractWord
Laminas CAPTCHA object
getErrorMessage()  : string
Get any error message after a failed captcha verification. The message can be displayed to the user.
getHtmlInputId()  : string
Getter for template
getHtmlInternalId()  : string
Getter for template
getId()  : string
Get ID for current CAPTCHA (to use e.g. in HTML forms)
getJsIncludes()  : array<string|int, mixed>
Get list of URLs with JS dependencies to load for the active CAPTCHA type.
verify()  : bool
Pull the captcha field from controller params and check them for accuracy

Properties

$cacheBasePath

Base path of cache where image will be stored, e.g. /vufind/cache/

protected string $cacheBasePath

$captcha

Laminas CAPTCHA object

protected AbstractWord $captcha

$captchaHtmlInputId

HTML input name for user input

protected string $captchaHtmlInputId = 'captcha-input'

$captchaHtmlInternalId

HTML input name for generated captcha

protected string $captchaHtmlInternalId = 'captcha-id'

Methods

__construct()

Constructor

public __construct(AbstractWord $captcha, string $cacheBasePath) : mixed
Parameters
$captcha : AbstractWord

Laminas CAPTCHA object

$cacheBasePath : string

e.g. /vufind/cache/

Return values
mixed

getCacheBasePath()

Getter for template

public getCacheBasePath() : string
Return values
string

getCaptcha()

Laminas CAPTCHA object

public getCaptcha() : AbstractWord
Return values
AbstractWord

getErrorMessage()

Get any error message after a failed captcha verification. The message can be displayed to the user.

public getErrorMessage() : string
Return values
string

getHtmlInputId()

Getter for template

public getHtmlInputId() : string
Return values
string

getHtmlInternalId()

Getter for template

public getHtmlInternalId() : string
Return values
string

getId()

Get ID for current CAPTCHA (to use e.g. in HTML forms)

public getId() : string
Return values
string

getJsIncludes()

Get list of URLs with JS dependencies to load for the active CAPTCHA type.

public getJsIncludes() : array<string|int, mixed>
Return values
array<string|int, mixed>

verify()

Pull the captcha field from controller params and check them for accuracy

public abstract verify(Params $params) : bool
Parameters
$params : Params

Controller params

Return values
bool

Search results