FilterInput

The Xmf\FilterInput class support cleaning and filtering data

FilterInput::getInstance()

Returns a Xmf\FilterInput object, only creating it if it does not already exist.

It is possible to customize the behavior of FilterInput by passing configuration variables to getInstance(). See the source for more information.

process($source)

Clean the $source, a string or array of values, processing to remove XSS and other bad code.

Returns the cleaned version of $source.

FilterInput::clean($source, $type)

Cleans the input $source removing XSS and other bad code using the defaults. Also, filters the input, conforming to the specified $type. 'STRING' is the default $type.

Available type are the same as documented with the cleanVar() method.

cleanVar($source, $type)

Cleans the input $source with rules established when the instance of FilterInput was instantiated. Also, filters the input, conforming it to the specified $type. 'STRING' is the default $type.

Available type are:

Returns the cleaned version of $source.

Last updated