silverorange Code


Swat.SwatEmailEntry
/Swat/SwatEmailEntry.php at line 17

Class SwatEmailEntry

SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatEntry
└─SwatEmailEntry

public class SwatEmailEntry
extends SwatEntry

An email entry widget

Automatically verifies that the value of the widget is a valid email address.

Copyright:
2005-2006 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

Fields inherited from Swat.SwatEntry
access_key, autocomplete, maxlength, minlength, nonce, read_only, size, tab_index, value
Fields inherited from Swat.SwatInputControl
required
Method Summary
protected array

getCSSClassNames()

Gets the array of CSS classes that are applied to this entry.

void

process()

Processes this email entry.

protected boolean

validateEmailAddress(string value)

Validates an email address.

Methods inherited from Swat.SwatEntry
display, getCSSClassNames, getDisplayValue, getFocusableHtmlId, getInputTag, getNonce, getRawValue, getState, getValidationMessage, hasRawValue, process, setState
Methods inherited from Swat.SwatInputControl
getForm, init
Methods inherited from Swat.SwatControl
addMessage, getNote, printWidgetTree
Methods inherited from Swat.SwatWidget
addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer
Methods inherited from Swat.SwatUIObject
addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible

Method Detail

/Swat/SwatEmailEntry.php at line 90

getCSSClassNames

protected array getCSSClassNames()

Gets the array of CSS classes that are applied to this entry

Returns:
the array of CSS classes that are applied to this entry.
See Also:
SwatUIObject::getCSSClassString()

/Swat/SwatEmailEntry.php at line 27

process

public void process()

Processes this email entry

Ensures this email address is formatted correctly. If the email address is not formatted correctly, adds an error message to this entry widget.


/Swat/SwatEmailEntry.php at line 62

validateEmailAddress

protected boolean validateEmailAddress(string value)

Validates an email address

This uses the PHP 5.2.x filter_var() function if it is available.

Parameters:
value - the email address to validate.
Returns:
true if $value is a valid email address and false if it is not.

silverorange Code