silverorange Code


Swat.SwatUriEntry
/Swat/SwatUriEntry.php at line 16

Class SwatUriEntry

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

public class SwatUriEntry
extends SwatEntry

A URI entry widget

Automatically verifies that the value of the widget is a valid URI.

Copyright:
2005-2008 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 URI entry.

protected boolean

validateUri(string value)

Validates a URI.

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/SwatUriEntry.php at line 78

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/SwatUriEntry.php at line 26

process

public void process()

Processes this URI entry

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


/Swat/SwatUriEntry.php at line 62

validateUri

protected boolean validateUri(string value)

Validates a URI

This uses the PHP 5.2.x filter_var() function. The URI must have a URI scheme and a host name.

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

silverorange Code