Public Member Functions | |
| HAW_link ($label, $url, $title="") | |
| add_image ($image) | |
| set_css_class ($css_class) | |
| set_br ($br) | |
| set_voice_text ($text, $audio_src="") | |
| set_voice_timeout ($timeout) | |
| set_voice_dtmf ($key) | |
| set_voice_input ($phrase) | |
Examples:
$myPage = new HAW_deck(...);
...
$myLink = new HAW_link("Continue","/mynextpage.php");
$myPage->add_link($myLink);
| HAW_link::HAW_link | ( | $ | label, | |
| $ | url, | |||
| $ | title = "" | |||
| ) |
Constructor
| label | Describes the link on the visitor's screen/display. | |
| url | Next destination address. | |
| title | (optional) If a string is provided here, it will be displayed by means of the title option on bigscreen browsers, respectively somewhere on the WAP/XHTML display. In order to work well with a broad range of user agents, keep your title under 6 characters. |
| HAW_link::add_image | ( | $ | image | ) |
| HAW_link::set_css_class | ( | $ | css_class | ) |
Sets a css class for this object in a (X)HTML page.
| css_class | CSS class to be defined in the deck's central CSS file |
| HAW_link::set_br | ( | $ | br | ) |
Sets the number of line breaks (CRLF) after link. (default: 1)
| br | Some number of line breaks. |
| HAW_link::set_voice_text | ( | $ | text, | |
| $ | audio_src = "" | |||
| ) |
Sets link text to be spoken by voice browsers.
| text | Some alternative text that replaces <label>. | |
| audio_src | Some audio file (e.g. *.wav file) to play (optional). |
| HAW_link::set_voice_timeout | ( | $ | timeout | ) |
Sets the link timeout for voice browsers (default: 10 sec).
Note: Voice decks with text only will force a disconnect immediately after the complete text has been spoken. Voice decks with text and links will wait some time for user voice input and will initiate the disconnect too, if no user input is received. For each link it is possible to specify an individual timeout value, i.e. a voice deck does not disconnect before the longest timeout of all active links expires.
| timeout | Timeout in seconds. |
| HAW_link::set_voice_dtmf | ( | $ | key | ) |
Sets a DTMF key as link trigger for voice browsers.
| key | "1", "2", ..., "9", "0", "*", "#" |
| HAW_link::set_voice_input | ( | $ | phrase | ) |
Sets a phrase the voice browser is reacting on instead of <label>.
| phrase | some text the user has to speak in order to trigger the link Pass an empty string, if voice triggering should be disabled. In this case you should use set_voice_dtmf to correlate the link with a given DTMF event. Otherwise the link could not be triggered at all. |
1.5.1