Methods
All methods in the Solar_Form class.
Public
-
__construct() -
Constructor.
-
__destruct() -
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
-
addFilter() -
Adds one filter to an element.
-
addFilters() -
Adds many filters to one element.
-
addInvalid() -
Adds one or more invalid message to an element, sets the element status to false (invalid), and sets the form status to false (invalid); if the element does not exist, adds the message as form-level feedback.
-
addInvalids() -
Adds invalidation messages to multiple elements, sets their status to false (invalid) and sets the form status to false (invalid).
-
dump() -
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
-
getElements() -
Gets multiple elements from this form.
-
getStatus() -
Gets the current overall form validation status.
-
getValue() -
Returns one form element value.
-
getValues() -
Returns the form element values as an array.
-
isFailure() -
Has the current form failed validation?
-
isSuccess() -
Has the current form been successfully validated?
-
load() -
Loads form attributes and elements from an external source.
-
locale() -
Looks up class-specific locale strings based on a key.
-
orderElements() -
Reorders the existing elements.
-
populate() -
Automatically populates form elements with specified values.
-
reset() -
Resets the form object to its originally-configured state, and adds an anti-CSRF element with the current value of the session token.
-
setAttribs() -
Sets the attributes of one element.
-
setElement() -
Sets one element in the form.
-
setElements() -
Sets multiple elements in the form.
-
setFilterLocaleObject() -
Tells the internal filter what object it should use for locale translations.
-
setStatus() -
Forcibly sets the overall form validation status.
-
setType() -
Sets the type of one element.
-
setValue() -
Manually set the value of one element.
-
setValues() -
Manually set the value of several elements.
-
validate() -
Applies the filter chain to the form element values; in particular, checks validation and updates the 'invalid' keys for each element that fails, and checks for CSRF attempts automatically.
Protected
-
_buildConfig() -
Builds and returns the default config for a class, including all configs inherited from its parents.
-
_exception() -
Convenience method for returning exceptions with localized text.
-
_load() -
Adds attribs and elements from the loader results into this form.
-
_populate() -
Recursive method to map the submitted values into elements.
-
_postConfig() -
A hook that activates after _buildConfig() in the constructor.
-
_postConstruct() -
Post-construction tasks to complete object construction.
-
_preConfig() -
Sets the default success and failure messages.
-
_prepareName() -
Prepares a name as an array key, if needed.
-
_values() -
Recursively pulls values from elements into an associative array.
Private
None.