
Static Public Member Functions | |
| static | get ($type, array $params=array(), $recreate=false) |
| Gets the form with given name. | |
| static | getByName ($name, $recreate=false) |
| Gets the form with given name. | |
Protected Member Functions | |
| createByName ($name) | |
| Creates a form with given name. | |
| includeFile ($_file, $form, $params) | |
| Needed for including the form file with a clean scope. | |
Static Protected Attributes | |
| static | $instances = array() |
| Factory instances. | |
| static | $allForms = array() |
| Central storage for all forms that have been generated. | |
Searches for form files in template folders.
Definition at line 7 of file DefaultFormFactory.class.php.
| spunQ_DefaultFormFactory::createByName | ( | $ | name | ) | [protected] |
Creates a form with given name.
If this factory is not able to create the form, it is expected to return NULL.
| $name | The name of the form to create. |
Reimplemented from spunQ_FormFactory.
Definition at line 12 of file DefaultFormFactory.class.php.
| static spunQ_FormFactory::get | ( | $ | type, | |
| array $ | params = array(), |
|||
| $ | recreate = false | |||
| ) | [static, inherited] |
Gets the form with given name.
WARNING: The provided forms are cached, successive calls to this function with the same name will yield the same object. Provide the $recreate parameter to change this behaviour.
| $name | The name of the form to retrieve. | |
| $params | Parameters to be passed to the form factory. | |
| $recreate | Forces bypassing of the cache, re-generating the form object using its form factory. Set this to true if one of the parameters to a form have changed somehow. |
Definition at line 35 of file FormFactory.class.php.
| static spunQ_FormFactory::getByName | ( | $ | name, | |
| $ | recreate = false | |||
| ) | [static, inherited] |
Gets the form with given name.
WARNING: The provided forms are cached, successive calls to this function with the same name will yield the same object. Provide the $recreate parameter to change this behaviour.
| $name | The name of the form to retrieve. | |
| $recreate | Forces bypassing of the cache, re-generating the form object using its form factory. Set this to true if one of the parameters to a form have changed somehow. |
Definition at line 73 of file FormFactory.class.php.
| spunQ_DefaultFormFactory::includeFile | ( | $ | _file, | |
| $ | form, | |||
| $ | params | |||
| ) | [protected] |
Needed for including the form file with a clean scope.
| $_file | The file to include. | |
| $form | The form variable for the file. | |
| $params | The variables to set. |
Definition at line 80 of file DefaultFormFactory.class.php.
spunQ_FormFactory::$allForms = array() [static, protected, inherited] |
Central storage for all forms that have been generated.
The forms are mapped by their name.
Definition at line 21 of file FormFactory.class.php.
spunQ_FormFactory::$instances = array() [static, protected, inherited] |
Factory instances.
There can be multiple form factories, each one will be requested to create the form with given name until one of them succeeeds.
Definition at line 14 of file FormFactory.class.php.
1.5.9