Overview
Handler for validating and sanitizing user input.
Includes one-off filtering as well as filter chains for flat data arrays.
Configuration Keys
classes
: Base class names for filters.
Constants
None.
Public Properties
The Solar_Filter class has no public properties; try the list of all properties.
Public Methods
These are all the public methods in the Solar_Filter class.
You can also view the list of all public, protected, and private methods.
-
__call()
-
Magic call to filter methods represented as classes.
-
__construct()
-
Constructor.
-
__destruct()
-
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
-
addChainFilter()
-
Adds one filter-chain method for a data key.
-
addChainFilters()
-
Adds many filter-chain methods for a data key.
-
addFilterClass()
-
Add to the filter class stack.
-
applyChain()
-
Applies the filter chain to an array of data in-place.
-
dataKeyExists()
-
Does the requested key exist in the data?
-
dump()
-
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
-
free()
-
Call this method before you unset() this instance to fully recover memory from circular-referenced objects.
-
getChainInvalid()
-
Gets the list of invalid keys and feedback messages from the filter chain.
-
getData()
-
Gets a copy of the data array, or a specific element of data, being processed by applyChain().
-
getDataKey()
-
Gets the current data key being processed by the filter chain.
-
getFilter()
-
Gets the stored filter object by method name.
-
getFilterClass()
-
Returns the filter class stack.
-
getRequire()
-
Returns the value of the 'require' flag.
-
locale()
-
Looks up class-specific locale strings based on a key.
-
newFilter()
-
Creates a new filter object by method name.
-
resetChain()
-
Resets the filter chain and required keys.
-
setChainLocaleObject()
-
Sets the object used for getting locale() translations during applyChain().
-
setChainRequire()
-
Sets whether or not a particular data key is required to be present and non-blank in the data being processed by applyChain().
-
setChainWhitelist()
-
Sets the whitelist of data keys for the filter chain.
-
setData()
-
Sets one data element being processed by applyChain().
-
setFilterClass()
-
Reset the filter class stack.
-
setRequire()
-
Sets the value of the 'require' flag.