__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
stringMethod name string.
arrayArray of method parameters.
mixedThe container method result.__construct(array $options)
__get(string $itemName) : \Formagic_Item_Abstract
stringName of requested member.
\Formagic_Exception |
|---|
\Formagic_Item_AbstractItem object__set(string $key, mixed $value) : void
__toString() : string
stringThe rendering result._init() : void
addBaseDir(string $baseDir) : void
stringBaseDir 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.
stringItem type string
stringItem name
arrayItem options array
\Formagic_Item_AbstractNew item instancegetBaseDirs() : array
arrayPlugin base directory stackgetFormAction() : string
stringForm action stringgetInfo() : string
stringThe form information string.getItemHolder() : \Formagic_Item_Container
\Formagic_Item_ContainerItem holder itemgetMethod() : string
stringThe form submit method.getRaw() : array
arrayValues arraygetRenderer() : \Formagic_Renderer_Interface
\Formagic_Renderer_InterfaceThe renderer objectgetTrackSubmission() : boolean
booleanSubmission tracking status.getTranslator() : \Formagic_Translator
If no translator is specified, an empty translator object is returned.
\Formagic_TranslatorThe translator objectgetValues() : array
arrayArray 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
booleanSubmission 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.
stringClass name. File name is $class.php
\Formagic_Exception |
if item class could not be loaded |
|---|
render() : string
Loads renderer class and calls renderer::fetch()
stringRenderer resultsetRenderer(string | \Formagic_Renderer_Interface $renderer) : \Formagic
string\Formagic_Renderer_InterfaceFormagic_Renderer object or string with name of renderer class
\FormagicFluent 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_TranslatorOne of the following:
\FormagicFluent 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 |
|---|
booleanValidation result_setOptions(array $options) : void
arrayArray of Formagic options
\Formagic_Exception |
If an option is not supported. |
|---|
_getTrackSubmissionItem() : \Formagic_Item_Hidden
\Formagic_Item_HiddenTrack submission item_setName(string $name) : \Fluent
string
\Fluentinterface$_baseDirs : array
$_method : string
$_submitValues : array
$_supportedMethods : array
$_formAction : string
$_name : string
$_renderer : \Formagic_Renderer
| see | \Formagic::setRenderer() |
|---|
$_trackSubmission : boolean
API_VERSION
VERSION