VirtueMart  3.2.14.9808
Static Public Member Functions | List of all members
vRequest Class Reference

Static Public Member Functions

static getUword ($field, $default='', $custom='')
 
static uword ($field, $default='', $custom='')
 
static filterUword ($source, $custom, $replace='')
 
static filterPath ($str)
 
static getBool ($name, $default=0)
 
static getInt ($name, $default=0, $source=0)
 
static getFloat ($name, $default=0.0)
 
static getCmd ($name, $default= '')
 
static getWord ($name, $default= '')
 
static getVar ($name, $default=null)
 
static getString ($name, $default= '')
 
static getHtml ($name, $default= '', $input=0)
 
static getEmail ($name, $default= '')
 
static filterUrl ($url)
 
static get ($name, $default=null, $filter=FILTER_UNSAFE_RAW, $flags=FILTER_FLAG_NO_ENCODE, $source=0)
 
static filter ($var, $filter, $flags, $array=false)
 
static recurseFilter (&$var, $filter, $flags=FILTER_FLAG_STRIP_LOW)
 
static getRequest ($filter=FILTER_SANITIZE_SPECIAL_CHARS, $flags=FILTER_FLAG_ENCODE_LOW)
 
static getPost ($filter=FILTER_SANITIZE_SPECIAL_CHARS, $flags=FILTER_FLAG_ENCODE_LOW)
 
static getGet ($filter=FILTER_SANITIZE_SPECIAL_CHARS, $flags=FILTER_FLAG_ENCODE_LOW)
 
static getFiles ($name, $filter=FILTER_SANITIZE_STRING, $flags=FILTER_FLAG_STRIP_LOW)
 
static setVar ($name, $value=null)
 
static vmSpecialChars ($c)
 
static vmCheckToken ($redirectMsg=0)
 
static getFormToken ($fNew=false)
 
static getHash ($seed)
 

Member Function Documentation

static vRequest::filter (   $var,
  $filter,
  $flags,
  $array = false 
)
static
static vRequest::filterPath (   $str)
static

This function does not allow unicode, replacement for JPath::clean and makesafe

Parameters
$string
bool$forceNoUni
Returns
mixed|string
static vRequest::filterUrl (   $url)
static
static vRequest::filterUword (   $source,
  $custom,
  $replace = '' 
)
static
static vRequest::get (   $name,
  $default = null,
  $filter = FILTER_UNSAFE_RAW,
  $flags = FILTER_FLAG_NO_ENCODE,
  $source = 0 
)
static

Main filter function, called by the others with set Parameters The standard filter is non restrictiv.

Author
Max Milbers
Parameters
$name
null$default
int$filter
int$flags
Returns
mixed|null
static vRequest::getBool (   $name,
  $default = 0 
)
static
static vRequest::getCmd (   $name,
  $default = '' 
)
static
  • Strips all characters <32 and over 127
  • Strips all html.
static vRequest::getEmail (   $name,
  $default = '' 
)
static
static vRequest::getFiles (   $name,
  $filter = FILTER_SANITIZE_STRING,
  $flags = FILTER_FLAG_STRIP_LOW 
)
static
static vRequest::getFloat (   $name,
  $default = 0.0 
)
static
static vRequest::getFormToken (   $fNew = false)
static
static vRequest::getGet (   $filter = FILTER_SANITIZE_SPECIAL_CHARS,
  $flags = FILTER_FLAG_ENCODE_LOW 
)
static
static vRequest::getHash (   $seed)
static
static vRequest::getHtml (   $name,
  $default = '',
  $input = 0 
)
static
  • Encodes all characters that has a numerical value <32.
  • keeps "secure" html
static vRequest::getInt (   $name,
  $default = 0,
  $source = 0 
)
static
static vRequest::getPost (   $filter = FILTER_SANITIZE_SPECIAL_CHARS,
  $flags = FILTER_FLAG_ENCODE_LOW 
)
static
static vRequest::getRequest (   $filter = FILTER_SANITIZE_SPECIAL_CHARS,
  $flags = FILTER_FLAG_ENCODE_LOW 
)
static

Gets the request and filters it directly. It uses the standard php function filter_var_array, The standard filter allows all chars, also the special ones. But removes dangerous html tags.

Author
Max Milbers
Parameters
array$filter
Returns
mixed cleaned $_REQUEST
static vRequest::getString (   $name,
  $default = '' 
)
static
  • Encodes all characters that has a numerical value <32.
  • strips html
static vRequest::getUword (   $field,
  $default = '',
  $custom = '' 
)
static
static vRequest::getVar (   $name,
  $default = null 
)
static
  • Encodes all characters that has a numerical value <32.
  • encodes <> and similar, so html and scripts do not work
static vRequest::getWord (   $name,
  $default = '' 
)
static
  • Strips all characters <32
  • Strips all html.
static vRequest::recurseFilter ( $var,
  $filter,
  $flags = FILTER_FLAG_STRIP_LOW 
)
static
static vRequest::setVar (   $name,
  $value = null 
)
static
static vRequest::uword (   $field,
  $default = '',
  $custom = '' 
)
static
static vRequest::vmCheckToken (   $redirectMsg = 0)
static

Checks for a form token in the request.

Returns
boolean True if token valid
static vRequest::vmSpecialChars (   $c)
static

The documentation for this class was generated from the following file: