__call()
__construct()
__get()
__set()
__toString()
_init()
addBaseDir()
createItem()
getBaseDirs()
getFormAction()
getInfo()
getItemHolder()
getMethod()
getRaw()
getRenderer()
getTrackSubmission()
getTranslator()
getValues()
isSubmitted()
loadClass()
render()
setFormAction()
setMethod()
setRenderer()
setTrackSubmission()
setTranslator()
setValues()
validate()
_setOptions()
_getTrackSubmissionItem()
_setName()
$_baseDirs
$_method
$_submitValues
$_supportedMethods
$_translator
$_formAction
$_itemHolder
$_name
$_renderer
$_submissionItem
$_trackSubmission
API_VERSION
VERSION
Formagic main and interface class
Highly extensible formgenerator with various rendering options, form validation and multipage support.
You can use the following options when creating a formagic instance:
- BaseDir |- Filter |- Item |- Renderer ^- Rule
category | Formagic |
---|---|
package | Formagic |
author | Florian Sonnenburg |
copyright | Copyright (c) 2007-2012 Florian Sonnenburg |
version | $Id: Formagic.php 169 2012-05-06 20:16:16Z meweasle $, $Revision: 70 $ |
__call(string $method, array $args) : mixed
string
Method name string.
array
Array of method parameters.
mixed
The container method result.__construct(array $options)
__get(string $itemName) : \Formagic_Item_Abstract
string
Name of requested member.
\Formagic_Exception |
---|
\Formagic_Item_Abstract
Item object__set(string $key, mixed $value) : void
__toString() : string
string
The rendering result._init() : void
addBaseDir(string $baseDir) : void
string
BaseDir to be added
createItem(string $type, string $name, array $args) : \Formagic_Item_Abstract
Tries to load correct object class and creates new object. Returns object if successfull, false if not.
string
Item type string
string
Item name
array
Item options array
\Formagic_Item_Abstract
New item instancegetBaseDirs() : array
array
Plugin base directory stackgetFormAction() : string
string
Form action stringgetInfo() : string
string
The form information string.getItemHolder() : \Formagic_Item_Container
\Formagic_Item_Container
Item holder itemgetMethod() : string
string
The form submit method.getRaw() : array
array
Values arraygetRenderer() : \Formagic_Renderer_Interface
\Formagic_Renderer_Interface
The renderer objectgetTrackSubmission() : boolean
boolean
Submission tracking status.getTranslator() : \Formagic_Translator
If no translator is specified, an empty translator object is returned.
\Formagic_Translator
The translator objectgetValues() : array
array
Array of form item valuesisSubmitted() : boolean
Check result is true for following rules: - if submission tracking is enabled in Formagic options and the submission variable is present - if submission tracking is disabled, but either GET or POST values (dependent on chosen submission method) are present
boolean
Submission statusloadClass(string $class) : void
Skipped if class is already loaded. loadClass() tries to load from any extension directories defined. Returns true if successful, false if not.
string
Class name. File name is $class.php
\Formagic_Exception |
if item class could not be loaded |
---|
render() : string
Loads renderer class and calls renderer::fetch()
string
Renderer resultsetRenderer(string | \Formagic_Renderer_Interface $renderer) : \Formagic
string\Formagic_Renderer_Interface
Formagic_Renderer object or string with name of renderer class
\Formagic
Fluent interfacesetTranslator(array | object | \Formagic_Translator $translatorDefinition) : \Formagic
$translator has to be either an array with two members, the first one beeing the translator object and the second one the name of the translator method, or a translator object. In the latter case the translator method is assumed '$translatorObject->_($string)'.
arrayobject\Formagic_Translator
One of the following:
\Formagic
Fluent interfacevalidate() : boolean
Iterates through all items added to the form. If any rule is violated, iteration is stopped. Returns true if no rules are violated. The result of validate() is cached.
todo | Think of a better solution for setValues() in line 611 |
---|
boolean
Validation result_setOptions(array $options) : void
array
Array of Formagic options
\Formagic_Exception |
If an option is not supported. |
---|
_getTrackSubmissionItem() : \Formagic_Item_Hidden
\Formagic_Item_Hidden
Track submission item_setName(string $name) : \Fluent
string
\Fluent
interface$_baseDirs : array
$_method : string
$_submitValues : array
$_supportedMethods : array
$_formAction : string
$_name : string
$_renderer : \Formagic_Renderer
see | \Formagic::setRenderer() |
---|
$_trackSubmission : boolean
API_VERSION
VERSION