firequest.class.php
FormIt
Copyright 2009-2011 by Shaun McCormick shaun@modx.com
FormIt is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any
later version.
FormIt is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
FormIt; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
- package
- formit
Handles all pre and POST requests for FormIt and abstracts hooks and validation processing.
- package
- formit
Properties



boolean
$clearFieldsAtEnd= 'false'
Set to true if wanting to prevent the clearing of fields at the end
Default valuefalseDetails
- Type
- boolean



array
$config= 'array'
An array of configuration properties
Default valuearrayDetails
- Type
- array
Methods



__construct(
\FormIt $formit, array $config
=
array
)
:
\fiRequest
Parameters
| Name |
Type |
Description |
| $formit |
\FormIt |
&$formit A reference to the FormIt class instance.
|
| $config |
array |
Optional. An array of configuration parameters. |
Returns



handle(
array $fields
=
array
)
:
string|voidHandle the POST request
Parameters
| Name |
Type |
Description |
| $fields |
array |
|
Returns
| Type |
Description |
| stringvoid |
|



hasHook(
string $hook
)
:
booleanCheck to see if a hook has been passed
Parameters
| Name |
Type |
Description |
| $hook |
string |
|
Returns



loadReCaptcha(
array $config
=
array
)
:
\reCaptchaLoad the reCaptcha service class
Parameters
| Name |
Type |
Description |
| $config |
array |
An array of configuration parameters for the reCaptcha class |
Returns
| Type |
Description |
| \reCaptcha |
|



loadValidator(
)
:
\fiValidatorLoads the Validator class.
Returns
Details
- access
- public



setSuccessMessage(
string $message
)
:
voidSets the success message placeholders
Parameters
| Name |
Type |
Description |
| $message |
string |
|



validate(
string $validationString
)
:
boolValidate all fields prior to post processing
Parameters
| Name |
Type |
Description |
| $validationString |
string |
|
Returns