Object | --Persistent | --Component | --Application
Located in File: /forms.inc.php
The Application class holds a reference to all the forms created in your application because the Owner for them is always the global Application object. This class is also used to switch the language for the whole application by using the Language property.
This class is also responsible for session management, if you include a restore_session=1 in your request, the object, when created, will destroy the existing session and will create a new one, so your application will start fresh.
![]() | Language | Sets the application language, so all forms in the application will share this setting. |
Defined in class Component |
||
![]() | Name | Specifies the name for the component. The name is used as an identifier and should be unique. |
![]() | Tag | A versatile property of every Component that can be used in any way you want |
![]() | ComponentCount | Indicates the number of components owned by the component. |
![]() | Components | Lists all the components owned by this component. |
![]() | ControlState | A flag to know the state of the control, csLoading, csDesigning |
![]() | DataFieldValue | This property returns the value of the datafield if any. |
![]() | NamePath | Specifies the path to uniquely identify a component, qualified by the owner when required. |
![]() | Owner | Indicates the component that is responsible for streaming and freeing this component. |
Defined in class Persistent |
||
![]() | NamePath | Used to serialize/unserialize. It returns the full path to identify this component. |
![]() | Owner | Owner of the component. |
property Language (line 114)
If you want to change the Language property for all your forms at once, you can use this property, as forms take this setting into account when switching language.
This property is of string type and you can set it to anything you want, provided your language files share the same value and your locale resources also share that setting.
property Name
property Tag
property ComponentCount
property Components
property ControlState
property DataFieldValue
property NamePath
property Owner
property NamePath
| __construct | Component constructor [Overrides Component::__construct()] |
| autoDetectLanguage | Performs an auto detection of the language used by the user browser and set the Language property accordingly. |
Defined in class Component |
||
![]() | dumpChildrenJavascript | Dumps the javascript code for all the children |
![]() | dumpFormItems | Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components |
![]() | dumpHeaderCode | Dumps header code required |
![]() | dumpJavascript | Dumps the javascript code needed by this component |
![]() | hasValidDataField | Returns true if a valid data field is attached to the component |
![]() | init | Initializes a component |
![]() | loaded | Initializes the component after the form file has been read into memory. |
![]() | loadedChildren | Calls childrens loaded |
![]() | preinit | Method called before init() |
![]() | serializeChildren | Serializes all children |
![]() | unserializeChildren | Unserializes all children by calling unserialize for all the components |
Defined in class Persistent |
||
![]() | serialize | Stores this object into the session. |
![]() | unserialize | This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call. |
Defined in class Object |
||
![]() | __construct | Constructs an object and initializes its data before the object is first used. |
![]() | className | Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument). |
![]() | classParent | Returns the type of the immediate ancestor of a class. |
Constructor __construct (line 117)
Overrides : Component::__construct() Component constructor
Method autoDetectLanguage (line 178)
This method performs a detection operation trying to guess which language is used by the user depending on the browser headers and information is sent.
Can be used to accomodate automatically your application to the right language the user want to get without prompting for it.
Valid languages can be found on language/php_language_detection.php on the function called languages() and you can get such list as an array calling that function in your software