Sources for file docs/filter.txt in version 3.0
Click on a comment to hide it. Click here to show all comments.
FILTER
Required Files
plugins/class/input.php
plugins/class/filter.php
Configuring
// automagically filter vars?
public $filter_vars = true;
// same as the php's register_global directive, except these get filtered.
public $global_vars = false;
// populate these prior to calling $xnyo->start()
// note this is the old behaviour, use of $xnyo->filter_get_vars() at any time
// is considered to be more convenient, these are kept for backwards compat.
public $get_vars = array();
public $post_vars = array();
public $cookie_vars = array();
// this will mirror the get/post/cookie arrays with series of true/false
// if the input has been modified by the filter at all, its set to true
public $input_modified = array();
// Input Parsing Functions
public $load_input = true;
// Variable Filter
public $load_filter = true;
Methods
// Filter Methods
'filter_plugin::init' => 'Filter: Init',
'filter_plugin::filter_get_var' => 'Filter: Get Var',
'filter_plugin::filter_post_var' => 'Filter: Post Var',
'filter_plugin::filter_cookie_var' => 'Filter: Cookie Var',
'filter_plugin::_filter_var' => 'Filter: Filter Var',
'filter_plugin::fetch' => 'Filter: Fetch Raw Vars',
// Input Plugin
'input_plugin::int' => 'Input: Integer',
'input_plugin::number' => 'Input: Number String',
'input_plugin::float' => 'Input: Float',
'input_plugin::double' => 'Input: Float',
'input_plugin::text' => 'Input: Text',
'input_plugin::string' => 'Input: String',
'input_plugin::safetext' => 'Input: Safe Text',
'input_plugin::filename' => 'Input: Filename',
'input_plugin::bool' => 'Input: Boolean',
'input_plugin::boolean' => 'Input: Boolean',
'input_plugin::username' => 'Input: Username',
'input_plugin::password' => 'Input: Password',
'input_plugin::email' => 'Input: Email',
'input_plugin::shell' => 'Input: Shell',
'input_plugin::alphanum' => 'Input: AlphaNumeric',
'input_plugin::hex' => 'Input: Hex',
'input_plugin::null' => 'Input: NULL',
'input_plugin::_array' => 'Input: Array',
'input_plugin::date' => 'Input: Date',
'input_plugin::date_year' => 'Input: Year',
'input_plugin::date_month' => 'Input: Month',
'input_plugin::date_day' => 'Input: Day',
'input_plugin::sqltext' => 'Input: SQL Text',
'input_plugin::sqlbinary' => 'Input: SQL Binary',
'input_plugin::unsqlbinary' => 'Input: unSQL Binary',
'input_plugin::htmlsafe' => 'Input: HTML Safe',
'input_plugin::htmlnlsafe' => 'Input: HTML \n Safe',
'input_plugin::unhtmlsafe' => 'Input: unHTML Safe',
'input_plugin::unhtmlnlsafe' => 'Input: unHTML \n Safe',
'input_plugin::trimwhitespace' => 'Input: Trim Whitespace',
Usage Examples
Using filtering to let variables through..
DEBUG CONSOLE
input variables
loaded plugins
debug log.
