HAW_input Class Reference

List of all members.

Public Member Functions

 HAW_input ($name, $value, $label, $format="*M")
 set_size ($size)
 set_maxlength ($maxlength)
 set_type ($type)
 set_mode ($mode)
 set_br ($br)
 set_voice_text ($text, $audio_src="")
 set_voice_type ($type)
 set_voice_grammar ($src, $type="")
 set_voice_help ($text, $audio_src="", $url="")
 set_voice_noinput ($text, $audio_src="", $url="")
 set_voice_nomatch ($text, $audio_src="", $url="")

Detailed Description

This class provides a text input field in a HAW_form object.

Examples:

$myInput1 = new HAW_input("cid", "", "Customer ID");

$myInput2 = new HAW_input("cid", "", "Customer ID", "*N");
$myInput2->set_size(6);
$myInput2->set_maxlength(6);

$myInput3 = new HAW_input("pw", "", "Password", "*N");
$myInput3->set_size(8);
$myInput3->set_maxlength(8);
$myInput3->set_type(HAW_INPUT_PASSWORD);

See also:
HAW_form


Member Function Documentation

HAW_input::HAW_input ( name,
value,
label,
format = "*M" 
)

Constructor

Parameters:
name Variable in which the input is sent to the destination URL.
value Initial value (string!) that will be presented in the input field.
label Describes your input field on the visitors's screen/display.
format (optional, default: "*M")
Input format code according to the WAP standard. Allows the WAP user client e.g. to input only digits and no characters.

HAW_input::set_size ( size  ) 

Set size of the input field.
Note: Will be ignored in case of HDML/VoiceXML output.

Parameters:
size Number of characters fitting into the input field.

HAW_input::set_maxlength ( maxlength  ) 

Set maximum of allowed characters in the input field.
Note: Will be ignored in case of HDML output.

Parameters:
maxlength Maximum number of characters the user can enter.

HAW_input::set_type ( type  ) 

Set input type

Parameters:
type Allowed values: HAW_INPUT_TEXT (default) or HAW_INPUT_PASSWORD.

HAW_input::set_mode ( mode  ) 

Set input mode/istyle for japanese MML/i-mode devices

Parameters:
mode input mode
HAW_INPUT_ALPHABET (default)
HAW_INPUT_KATAKANA
HAW_INPUT_HIRAGANA
HAW_INPUT_NUMERIC

HAW_input::set_br ( br  ) 

Sets the number of line breaks (CRLF) after input field (default: 1).
Note: Has no effect in WML/HDML.

Parameters:
br Some number of line breaks.

HAW_input::set_voice_text ( text,
audio_src = "" 
)

Sets text to be spoken by voice browsers.

Parameters:
text Some alternative text that replaces <label>.
audio_src Some audio file (e.g. *.wav file) to play (optional).

HAW_input::set_voice_type ( type  ) 

Sets the type of the input field in voice decks (default: "digits").
Note: Support of builtin grammar types is platform specific. The W3C VoiceXML Version 2.0 recommendation defines these grammar types:

Parameters:
type String with grammar type.

HAW_input::set_voice_grammar ( src,
type = "" 
)

Defines an external grammar for an input field in voice decks.
Attention: This function should be used by experienced VoiceXML developers only! Please refer to the W3C VoiceXML Recommendation for detailled info about grammar definitions.

Parameters:
src URL specifying the location of the grammar, e.g. "http://www.foo.com/myinput.grxml".
type Media type of the grammar, e.g. "application/srgs+xml (optional)".

HAW_input::set_voice_help ( text,
audio_src = "",
url = "" 
)

Sets help text for voice browsers.

Parameters:
text Some helpful information concerning this input.
audio_src Some audio file (e.g. *.wav file) to play (optional).
url Some other voice deck to go to (optional).

HAW_input::set_voice_noinput ( text,
audio_src = "",
url = "" 
)

Sets noinput text for voice browsers.

Parameters:
text Some text to inform the user that no input has been received.
audio_src Some audio file (e.g. *.wav file) to play (optional).
url Some other voice deck to go to (optional).

HAW_input::set_voice_nomatch ( text,
audio_src = "",
url = "" 
)

Sets nomatch text for voice browsers.

Parameters:
text Some text to complain that user input was not recognized.
audio_src Some audio file (e.g. *.wav file) to play (optional).
url Some other voice deck to go to (optional).


The documentation for this class was generated from the following file:
Generated on Mon Dec 6 21:51:55 2010 for HAWHAW PHP by  doxygen 1.5.1