Documentation

FormData
in package
Uses Singleton

A class that provides helpers for accessing form data

Table of Contents

$instance  : object
The only instance of using class
$getters  : array<, object>
$map  : string
__call()  :
Map old formadata calls onto new style calls
getinstance()  : object
Checks, instantiates and returns the only instance of the using class.
getter()  : object
Return the getter for this particular form type
recaptcha()  : bool
Deal with a recaptcha

Properties

$instance

The only instance of using class

protected static object $instance = NULL

$getters

private array<, object> $getters = []

An array of all the getters for forms

$map

private string $map = ['cookie', 'file', 'get', 'post', 'put']

Parameter values that indicate which data we want

Methods

__call()

Map old formadata calls onto new style calls

public __call(string $calling, array<, mixed> $arguments) :
Parameters
$calling : string

The function name

$arguments : array<, mixed>

The parameters

Tags
deprecated
Return values

getinstance()

Checks, instantiates and returns the only instance of the using class.

public static getinstance() : object
Tags
template

object

psalm-return

object

psalm-suppress

MismatchingDocblockReturnType

psalm-suppress

ReservedWord

Return values
object

getter()

Return the getter for this particular form type

public getter(string $which) : object
Parameters
$which : string

The getter we want.

Return values
object

recaptcha()

Deal with a recaptcha

public recaptcha() : bool

For this to work, you need three constants defined in \Config\Config :

RECAPTCHA - the kind of RECAPTCHA: 2 or 3 (0 means no RECAPTCHA) RECAPTCHAKEY - the key given by google RECAPTCHASECRET - the secret key given by google

Tags
psalm-suppress

UndefinedClass

psalm-suppress

UndefinedConstant

Return values
bool

Search results