FORMfields


FORMfields.FfExtHelper

Class FfExtHelper

FfExtHelper

public class FfExtHelper

FfExtHelper a helper class that contains methods that are rarely used by FORMfields.

Since:
FORMfields v2.0

Method Summary
void

appendParameterToUri(string uri, string paramExpression)

Returns a URI with parameter expression appended to the query string.

string

getFullCountryName(string countryAbbreviation)

Return the full country name.

string

getFullStateName(string stateAbbreviation)

Return the full U.S.

the

getIndex(array input, string key)

Returns the numeric index position of a key, where the numeric index starts at 0.

a

getQueryString(array params)

Returns a URL query string constructed from an associative array.

void

hexDump(string str)

Echos a hexidecimal dump of binary data.

a

removeParameterFromUri(string uri, string paramName)

Returns a URI without the specified parameter and parameter value.

string

stringToPattern(string str)

Returns a string of characters that are treated as regular expression constants and not regular expression control characters.

Method Detail

appendParameterToUri

public void appendParameterToUri(string uri, string paramExpression)

Returns a URI with parameter expression appended to the query string.

Parameters:
uri - a URI string
paramExpression - a parameter expression like "paramName1=paramValue1"
Since:
FORMfields v3.0

getFullCountryName

public string getFullCountryName(string countryAbbreviation)

Return the full country name.

Parameters:
countryAbbreviation - the abbreviation for a country
Returns:
the full country name
Since:
FORMfields v2.0

getFullStateName

public string getFullStateName(string stateAbbreviation)

Return the full U.S. state name.

Parameters:
stateAbbreviation - the 2 character abbreviation for a state
Returns:
the full state name
Since:
FORMfields v2.0

getIndex

public the getIndex(array input, string key)

Returns the numeric index position of a key, where the numeric index starts at 0.

Parameters:
input - an array
key - an array key
Returns:
numeric index position of the key
Since:
FORMfields v2.0

getQueryString

public a getQueryString(array params)

Returns a URL query string constructed from an associative array. This method uses urlencode on the parameter names.

Parameters:
params - an associative array where the array index is the parameter name and the array value is the parameter value
Returns:
URL query string constructed from an associative array
Since:
FORMfields v2.0

hexDump

public void hexDump(string str)

Echos a hexidecimal dump of binary data.

Parameters:
str - a binary string of data
Since:
FORMfields v3.0

removeParameterFromUri

public a removeParameterFromUri(string uri, string paramName)

Returns a URI without the specified parameter and parameter value. Or, just the URI if the parameter doesn't exist. For example:
tester2.php?removeParam=1 => tester2.php
tester2.php?removeParam=1¶m2=2¶m3=3 => tester2.php?param2=2¶m3=3

Parameters:
uri - a URI string
paramName - the name of the parameter to remove
Returns:
URI without the specified parameter and parameter value
Since:
FORMfields v3.0

stringToPattern

public string stringToPattern(string str)

Returns a string of characters that are treated as regular expression constants and not regular expression control characters.

Parameters:
str - a string of characters that have not already been escaped
Returns:
an escaped string of characters that are treated as regular expression constants
Since:
FORMfields v2.0

FORMfields