The documentation is incomplete. The Vae Soli! team works hard to make it as exhaustive as possible with tons of useful examples and easy to understand explanations.
On top of that, we have decided to use our own tool to generate the documentation you read. This also takes time to fine-tune. Our goal is have better documentation, easier to read, easier to use, completely integrated with our site.
Even though NOT finalized, you can now link back to our documentation pages as we have decided once and for all about the structure of our documents and where they all reside on our server.
Thank you very much
The Vae Soli! team.
Generated by The Vae Soli! Documentor: Guide v. 1.3.0018 on 26-04-2014 07:11:36 (DD-MM-YYYY HH:mm:SS). This documentation is built with Vae Soli! functions and classes!
Assertions count: 8
Assertions successful: 8
Assertion failures: 0
LSInput.class.php
exceeds 51200 bytes. We suggest this file got broken down in smaller chunks!
LSInput.class.php
contains 3574 lines of code, which exceeds the suggested limit of 1024 lines. We suggest this file got broken down in smaller chunks!
LS_INPUT_CLASS_PWH
: Define "LS" Input services (Pat Was Here)
VAESOLI_PATH
: Define the path where Vae Soli! is installed
VAESOLI_PLUGINS
: Define the path where plugins are located
LSInput.class.inc
: Constants and definitions for LSInput
LSControl.class.php
: Control class
LSUnitTesting.class.php
: Vae Soli! Unit Testing
LSInput
extends LSControl
Input zones services for formsName | Visibility | Type | Description |
---|---|---|---|
$Autofocus |
public | bool | Determines if an input zone must receive the focus automatically |
$Autofocus |
public | bool | Determines if an input zone benefits from the autocomplete feature |
$PrerenderFnc |
public | string | Callback to play AFTER rendering |
$PrerenderFnc |
public | string | Callback to play BEFORE rendering |
$aControls |
public | array | An array of inner controls |
$aOnClauses |
public | array | An array of on<…> clauses (onclick ,onblur ,…) |
$iAlignment |
public | int | Input alignment (0 = left; 1 = right; 2 = center) |
$szControlSource |
public | string | The source of the control |
$szDataSource |
public | string | Typically, the name of a file |
$szGetDataFnc |
public | string | Typically, the name of a function to execute when getting the data |
$szInputMask |
public | string | Input zone input mask |
$szLanguage |
public | string | Language the control must be rendered in (applicable to few control types such as "currency", "country", ...) |
$szList |
public | string | ???? |
$szPlaceHolder |
public | string | A placeholder value (tooltip in HTML5), which is a hint of how the zone must be filled |
$szSetDataFnc |
public | string | Typically, the name of a function to execute when setting the data |
$szValue |
public | mixed | A string, very often, because rendered as a string. Value of the input zone |
$xGetDefault |
public | mixed | A default value that must be associated with the input zone when GET ting data (see $szControlSource ) |
$xSetDefault |
public | mixed | A default value that must be associated with the input zone when SET ting data (see $szControlSource ) |
LSControl
)Name | Type |
---|---|
Databag |
boolean |
IsHTML5 |
boolean |
IsMandatory |
boolean |
IsReadonly |
boolean |
IsVisible |
boolean |
aGenes |
NULL |
aHTML5Match |
array |
iHeight |
NULL |
iIndentLevel |
integer |
iIndentSpaces |
integer |
iInstance |
integer |
iInstances |
integer |
iLeft |
NULL |
iLevel |
integer |
iMaxLength |
NULL |
iSize |
NULL |
iTop |
NULL |
iWidth |
NULL |
oContainer |
NULL |
szBrowser |
NULL |
szClass |
NULL |
szComment |
NULL |
szDesc |
NULL |
szErrorMsg |
string |
szGUID |
NULL |
szID |
NULL |
szInnerLeader |
NULL |
szInnerTrailer |
NULL |
szLang |
string |
szLeader |
NULL |
szName |
NULL |
szOnBlur |
NULL |
szOnChange |
NULL |
szOnClick |
NULL |
szOnFocus |
NULL |
szOnKeyDown |
NULL |
szOnKeyPress |
NULL |
szOnKeyUp |
NULL |
szOnLoad |
NULL |
szOnMouseOver |
NULL |
szOnSelect |
NULL |
szOnSubmit |
NULL |
szOnUnLoad |
NULL |
szPixels |
string |
szPlatform |
NULL |
szStyle |
NULL |
szText |
NULL |
szTitle |
NULL |
szTooltip |
NULL |
szTrailer |
NULL |
szType |
NULL |
szValue |
NULL |
'pattern'
attribute of the input zone__construct()
: Class constructorAdditional info to be found on the subject: http://www.vaesoli.org/samples.php?pageref=lsform#VAE-miscellaneous-input http://www.vaesoli.org/samples.php?pageref=multi-credentials#VAE-datalist
__construct( $szType,$szID,$szName,$szValue,$szControlSource )
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$szType |
string | Input type ( textbox, combobox, ...). The
following input types are permitted:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$szID |
string | ID of the input zone. Optional. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$szName |
string | Name of the input zone. Optional. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$szValue |
string | Value of the control. Optional. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$szControlSource |
string | Control source (field). Optional. |
__construct()
uses 5 parameters whereas the suggested limit is 3.
$oForm = new LSForm( 'frmSearch' ); $oForm->NoECMA = true; $oFieldset = new LSFieldset( 'set1',null," [ Search Form ] " ); $oFieldset->szStyle = 'border:1px solid #800;'; $oFieldset->AddObject( new LSLabel( 'lblSearch' ,'lblSearch','Search:' ) ); $oFieldset->AddObject( new LSInput( 'textbox' ,'txtSearch','txtSearch' ) ); $oFieldset->AddObject( new LSInput( 'submit' ,'cmdGo' ,'cmdGo' ,'Go!' ) ); $oFieldset->SetAll( 'label' ,'szStyle','display:inline-block;width:15em;font-size:0.8em;' ); $oFieldset->SetAll( 'textbox','szStyle','width:25em;' ); $oFieldset->SetAll( 'submit','szStyle','margin-left:1em;' ); $oFieldset->cmdGo->szCaption = 'Go!'; $lblSearch = $oFieldset->lblSearch; $lblSearch->szFor = $oFieldset->txtSearch; $lblSearch->szTooltip = $lblSearch->AutoTooltip(); $oFieldset->txtSearch->szTooltip = "Indicate the terms to look for"; $oForm->szStyle = 'width:50%;margin:1.5em 0;'; $oForm->AddObject( $oFieldset ); $oForm->szOnSubmit = 'return false;'; echo $oForm;
$txtName = new LSInput( 'text','txtName','txtName' ); $txtName->szTrailer = '<br />'; $lblName = new LSLabel( 'Name:' ); $lblName->szStyle = 'font: arial;display:inline-block;width:8em;margin-right:1em;color:#000;text-align:right;'; $lblName->szFor = $txtName; echo $szHTML = $lblName . $txtName; echo LSUnitTesting::assert( preg_match( '/<input(.*)\/>/si',$szHTML ) , 'ASSERTION SUCCESSFUL: input zone seems to be correct' , 'ASSERTION FAILURE: incorrect input zone' , 'GuideAssert' ); $cboName = new LSInput( 'combo','cboOptions','cboOptions' ); $cboName->AddOption( 'Option 1','8a5a301a-6d74-42b7-aee3-e1356c7bdbb3' ); $cboName->AddOption( 'Option 2','8630fc20-4431-42ee-87a9-869846f07574' ); $cboName->AddOption( 'Option 3','165039ce-d631-41fc-94d8-4c9b58602fce' ); $lblName->szCaption = 'Option:'; $lblName->szFor = $cboName; echo $szHTML = $lblName . $cboName; echo LSUnitTesting::assert( preg_match( '/<select(.*)><\/select>/si',$szHTML ) , 'ASSERTION SUCCESSFUL: select zone seems to be correct' , 'ASSERTION FAILURE: incorrect select zone' , 'GuideAssert' );
GuideAssert() ... ASSERTION SUCCESSFUL: input zone seems to be correct
GuideAssert() ... ASSERTION SUCCESSFUL: select zone seems to be correct
2 assertions: 2 successful; 0 failed
__toString()
: Allows the class to decide how it will react when it is treated like a string. A call to Render() is performed.__toString()
None
(string) HTML code that represents the calculator
true === true
successful
1 assertions: 1 successful; 0 failed
AddObject()
: Add a control to the list of controlsAddObject( $oControl )
Name | Type | Description |
---|---|---|
$oControl |
object | The control to be added to the current control. |
(void)
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
BuildAutocomplete()
: Builds an autocomplete attributeCreated: 20/07/2012 19:02
Since version 5.0.0005
Modified: 19/04/2014 23:47 } {*noassert
BuildAutocomplete( $oForm )
Name | Type | Description |
---|---|---|
$oForm |
LSForm | The form the control belongs to |
(string) The autocomplete attribute
true === true
successful
1 assertions: 1 successful; 0 failed
BuildAutofocus()
: Builds an autofocus attributeCreated: 20/07/2012 17:23
Since version 5.0.0005
BuildAutofocus( $oForm )
Name | Type | Description |
---|---|---|
$oForm |
LSForm | The form the control belongs to |
(string) The autofocus attribute
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
BuildHiddenName()
: Builds a hidden nameCreated: 20/07/2012 17:23
Since version 5.0.0005
Not to be used in a production environment (03-09-13 12:32:21). [c]WithPreviousValues[/c] drives the behavior of this method
BuildHiddenName( $oForm )
Name | Type | Description |
---|---|---|
$oForm |
LSForm | The form the control belongs to. Optional. |
(string) The 'name' attribute (previous value of the control)
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
BuildList()
: Builds a list of ID to a structureCreated: 20/07/2012 19:02
Since version 5.0.0005
Modified: 20/04/2014 01:15 } {*noassert
BuildList( $oForm )
Name | Type | Description |
---|---|---|
$oForm |
LSForm | The form the control belongs to. Optional.
null by default |
(string) The "list"
attribute of the control
(ready to be used in a datalist)
true === true
successful
1 assertions: 1 successful; 0 failed
BuildPlaceholder()
: Builds a placeholder (hint to a zone)Created: 22/07/2012 20:47
Since version 5.0.0005
BuildPlaceholder( $oForm )
Name | Type | Description |
---|---|---|
$oForm |
LSForm | The form the control belongs to. Optional. |
(string) The 'placeholder' attribute ...
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
BuildRequired()
: Builds a required attributeCreated: 20/07/2012 17:23
Since version 5.0.0005
A __chkNotEmpty
call is added on the onblur
event
of the input zone.
BuildRequired( $oForm )
Name | Type | Description |
---|---|---|
$oForm |
LSForm | The form the control belongs to. Optional. |
(string) The 'required' attribute
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
Render()
: Renders an input control, either in "edit" or in "view" mode (default mode).Modified: 20/04/2014 08:17 } {*noassert
Render( $o1,$o2,$szMode )
Name | Type | Description |
---|---|---|
$o1 |
LSForm | The form the control belongs to.
Optional. null by default. |
$o2 |
LSFieldset | The fieldset the control belongs to
Optional. null by default. |
$szMode |
string | Mode the control must be rendered in.
"view" by default. |
(string) HTML code of the control
true === true
successful
1 assertions: 1 successful; 0 failed
RenderEdit()
: Renders an input control in "edit" modeModified: 20/04/2014 08:17
This method is no different compared to [c]RenderView()[/c] (20-04-14 08:30:39)
RenderEdit( $o1,$o2 )
Name | Type | Description |
---|---|---|
$o1 |
LSForm | The form the control belongs to.
Optional. null by default. |
$o2 |
LSFieldset | The fieldset the control belongs to
Optional. null by default. |
(string) HTML code of the control
true === true
successful
1 assertions: 1 successful; 0 failed
RenderPattern()
: Builds the 'pattern'
attribute of the input zoneRenderPattern( $szType )
Name | Type | Description |
---|---|---|
$szType |
string | Control type. Optional.
null by default. |
(string) 'pattern'
clause of the control
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
RenderView()
: Renders an input zone in "view" modeModified: 20/04/2014 08:37
RenderView( $o1,$o2 )
Name | Type | Description |
---|---|---|
$o1 |
LSForm | The form the control belongs to.
Optional. null by default. |
$o2 |
LSFieldset | The fieldset the control belongs to.
Optional. null by default. |
(string) HTML code of the control
true === true
successful
1 assertions: 1 successful; 0 failed
TreatTags()
: Treat internal tags partially based on bbcodesSo far the following list of codes is treated by Vae Soli!:
pre | ... -> <pre> |
/pre | ... -> </pre> |
p | ... -> <p> |
/p | ... -> </p> |
b | ... -> <strong> |
/b | ... -> </strong> |
i | ... -> <em> |
/i | ... -> </em> |
code | ... -> <code> |
/code | ... -> </code> |
a | ... -> <a> |
/a | ... -> </a> |
TreatTags( $szValue )
Name | Type | Description |
---|---|---|
$szValue |
string | The value whose bbcodes will be turned to their HTML equivalents. |
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
LSLInput
extends LSInput
Input + labelLSInput
)Name | Type |
---|---|
Autocomplete |
boolean |
Autofocus |
boolean |
Databag |
boolean |
IsHTML5 |
boolean |
IsMandatory |
boolean |
IsReadonly |
boolean |
IsVisible |
boolean |
PostRenderFnc |
NULL |
PreRenderFnc |
NULL |
aControls |
array |
aGenes |
NULL |
aHTML5Match |
array |
aOnClauses |
array |
iAlignment |
integer |
iHeight |
NULL |
iIndentLevel |
integer |
iIndentSpaces |
integer |
iInstance |
integer |
iInstances |
integer |
iLeft |
NULL |
iLevel |
integer |
iMaxLength |
NULL |
iSize |
NULL |
iTop |
NULL |
iWidth |
NULL |
oContainer |
NULL |
szBrowser |
string |
szClass |
NULL |
szComment |
NULL |
szControlSource |
NULL |
szDataSource |
NULL |
szDesc |
NULL |
szErrorMsg |
string |
szGUID |
NULL |
szGetDataFnc |
NULL |
szID |
NULL |
szInnerLeader |
NULL |
szInnerTrailer |
NULL |
szInputMask |
string |
szLang |
string |
szLanguage |
NULL |
szLeader |
NULL |
szList |
NULL |
szName |
NULL |
szOnBlur |
NULL |
szOnChange |
NULL |
szOnClick |
NULL |
szOnFocus |
NULL |
szOnKeyDown |
NULL |
szOnKeyPress |
NULL |
szOnKeyUp |
NULL |
szOnLoad |
NULL |
szOnMouseOver |
NULL |
szOnSelect |
NULL |
szOnSubmit |
NULL |
szOnUnLoad |
NULL |
szPixels |
string |
szPlaceHolder |
NULL |
szPlatform |
string |
szSetDataFnc |
NULL |
szStyle |
NULL |
szText |
NULL |
szTitle |
NULL |
szTooltip |
NULL |
szTrailer |
NULL |
szType |
NULL |
szValue |
string |
xGetDefault |
NULL |
xSetDefault |
NULL |