vBulletin v6.0.4

vB_Cleaner
in package
Uses vB_Trait_NoSerialize

Class to handle and sanitize variables from GET, POST and COOKIE etc

Tags
date

$Date: 2022-11-07 11:42:45 -0800 (Mon, 07 Nov 2022) $

Table of Contents

Constants

CONVERT_KEYS  = 200
CONVERT_SINGLE  = 100
STR_NOHTML  = self::TYPE_NOHTML
TYPE_ARRAY  = 10
TYPE_ARRAY_ARRAY  = 110
TYPE_ARRAY_BINARY  = 112
TYPE_ARRAY_BOOL  = 101
TYPE_ARRAY_FILE  = self::TYPE_FILE
TYPE_ARRAY_INT  = 102
TYPE_ARRAY_KEYS_INT  = 202
TYPE_ARRAY_KEYS_STR  = 207
TYPE_ARRAY_NOHTML  = 109
TYPE_ARRAY_NOHTMLCOND  = 113
TYPE_ARRAY_NOTRIM  = 108
TYPE_ARRAY_NUM  = 104
TYPE_ARRAY_STR  = 107
TYPE_ARRAY_UINT  = 103
TYPE_ARRAY_UNIXTIME  = 106
TYPE_ARRAY_UNUM  = 105
TYPE_BINARY  = 12
TYPE_BOOL  = 1
TYPE_FILE  = 11
TYPE_INT  = 2
TYPE_NOCLEAN  = 0
TYPE_NOHTML  = 9
TYPE_NOHTMLCOND  = 13
TYPE_NOTRIM  = 8
TYPE_NUM  = 4
TYPE_STR  = 7
TYPE_UINT  = 3
TYPE_UNIXTIME  = 6
TYPE_UNUM  = 5

Methods

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
clean()  : mixed
Makes a single variable safe to use and returns it
cleanArray()  : array<string|int, mixed>
Makes data in an array safe to use
xssClean()  : string
Removes HTML characters and potentially unsafe scripting words from a string
xssCleanUrl()  : string
Removes HTML characters and potentially unsafe scripting words from a URL Note: The query string and the URL #fragment are preserved.

Constants

CONVERT_KEYS

public mixed CONVERT_KEYS = 200

CONVERT_SINGLE

public mixed CONVERT_SINGLE = 100

STR_NOHTML

public mixed STR_NOHTML = self::TYPE_NOHTML

TYPE_ARRAY

public mixed TYPE_ARRAY = 10

TYPE_ARRAY_ARRAY

public mixed TYPE_ARRAY_ARRAY = 110

TYPE_ARRAY_BINARY

public mixed TYPE_ARRAY_BINARY = 112

TYPE_ARRAY_BOOL

public mixed TYPE_ARRAY_BOOL = 101

TYPE_ARRAY_FILE

public mixed TYPE_ARRAY_FILE = self::TYPE_FILE

TYPE_ARRAY_INT

public mixed TYPE_ARRAY_INT = 102

TYPE_ARRAY_KEYS_INT

public mixed TYPE_ARRAY_KEYS_INT = 202

TYPE_ARRAY_KEYS_STR

public mixed TYPE_ARRAY_KEYS_STR = 207

TYPE_ARRAY_NOHTML

public mixed TYPE_ARRAY_NOHTML = 109

TYPE_ARRAY_NOHTMLCOND

public mixed TYPE_ARRAY_NOHTMLCOND = 113

TYPE_ARRAY_NOTRIM

public mixed TYPE_ARRAY_NOTRIM = 108

TYPE_ARRAY_NUM

public mixed TYPE_ARRAY_NUM = 104

TYPE_ARRAY_STR

public mixed TYPE_ARRAY_STR = 107

TYPE_ARRAY_UINT

public mixed TYPE_ARRAY_UINT = 103

TYPE_ARRAY_UNIXTIME

public mixed TYPE_ARRAY_UNIXTIME = 106

TYPE_ARRAY_UNUM

public mixed TYPE_ARRAY_UNUM = 105

TYPE_BINARY

public mixed TYPE_BINARY = 12

TYPE_BOOL

public mixed TYPE_BOOL = 1

TYPE_FILE

public mixed TYPE_FILE = 11

TYPE_NOCLEAN

public mixed TYPE_NOCLEAN = 0

TYPE_NOHTML

public mixed TYPE_NOHTML = 9

TYPE_NOHTMLCOND

public mixed TYPE_NOHTMLCOND = 13

TYPE_NOTRIM

public mixed TYPE_NOTRIM = 8

TYPE_UINT

public mixed TYPE_UINT = 3

TYPE_UNIXTIME

public mixed TYPE_UNIXTIME = 6

TYPE_UNUM

public mixed TYPE_UNUM = 5

Methods

__serialize()

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

__sleep()

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

__unserialize()

public __unserialize(array<string|int, mixed> $serialized) : void
Parameters
$serialized : array<string|int, mixed>

clean()

Makes a single variable safe to use and returns it

public & clean(mixed &$var[, mixed $vartype = self::TYPE_NOCLEAN ][, mixed $exists = true ]) : mixed
Parameters
$var : mixed
$vartype : mixed = self::TYPE_NOCLEAN
$exists : mixed = true
Return values
mixed

The cleaned value

cleanArray()

Makes data in an array safe to use

public cleanArray(mixed &$source, mixed $variables) : array<string|int, mixed>
Parameters
$source : mixed
$variables : mixed
Return values
array<string|int, mixed>

xssClean()

Removes HTML characters and potentially unsafe scripting words from a string

public xssClean(mixed $var) : string
Parameters
$var : mixed
Return values
string

xssCleanUrl()

Removes HTML characters and potentially unsafe scripting words from a URL Note: The query string and the URL #fragment are preserved.

public xssCleanUrl(mixed $url) : string
Parameters
$url : mixed
Return values
string

        
On this page

Search results