helpers.php File Reference
Detailed Description
SignWare Dynamic Development toolkit.
- Author:
- uko
Helper functions to access SignWare from a PHP environment
Traces
Enumeration Type Documentation
|
Set this define to TRUE to dump the options string in a separate browser window (for debugging / demonstration purposes).
|
Function Documentation
|
convert an ASCII-HEX string to a number
- Parameters:
-
- Returns:
- integer the number
- Note:
- PHP cannot convert negative 8 digit hex numbers due to internal limitations. This method converts 8 digit negative HEX numbers correctly
|
|
Check the PHP environment.
- Returns:
- String, empty string if all required extensions are loaded, else a list of missing modules
|
dumpFile |
( |
$ |
aName, |
|
|
$ |
aData, |
|
|
$ |
iLen = 0 |
|
) |
|
|
|
Write some data into a file.
- Parameters:
-
| $aName | [i] name of the file to write, must be a fully qualified filename (incl. path) |
| $aData | [i] the data to write |
| $iLen | [i] the length of the data buffer, may be 0 (strlen($aData) will be used |
|
|
Query a POST or GET parameter.
- Parameters:
-
| $aName | [i] name of the parameter |
- Returns:
- String the value, or "" if it is not set
|
|
Read a file.
- Parameters:
-
| $aName | [i] name of the file to read, must be a fully qualified filename (incl. path) |
- Returns:
- String the data read
|
makeAbsFile |
( |
$ |
relFile |
) |
|
|
|
Make an absolute file name to the provided relative link location.
- Parameters:
-
| $relFile | [i] relative link location |
- Returns:
- String the FQN (fully qualified filename)
- Note:
- assuming the server files are located in "C:\signware\b_api\samples\php" and $relAdr is "tmp/tmpFile.bmp" then makeLink returns "C:\signware\b_api\samples\php\tmp\tmpFile.bmp"
The server address is read from the global PHP variable $_SERVER["SCRIPT_FILENAME"], the link is thus relative to the current SCRIPT_FILENAME page.
|
|
Make a link to the provided relative link location.
- Parameters:
-
| $relAdr | [i] relative link location |
- Returns:
- String the link location
- Note:
- This function uses SERVER_PROTOCOL and HTTP_HOST to create the absolute address. It may fail for ome virtual host configurations
|
popupParamString |
( |
$ |
aString |
) |
|
|
|
Popup a new browser window to display the contents of the options string |
|
Save data that was returned from a PadInfo query in the session.
The session variable "pad_Device" will be set to 0 (no device) or a valid device id The session variable "pad_Width" will be set if a device was detected The session variable "pad_Height" will be set if a device was detected The session variable "pad_LcdBpP" will be set if a device with lcd screen was detected The session variable "pad_LcdWidth" will be set if a device with lcd screen was detected The session variable "pad_LcdHeight" will be set if a device with lcd screen was detected |
setSessionIntfromHexString |
( |
$ |
aName, |
|
|
$ |
aValue |
|
) |
|
|
|
private helper function to convert a hex string to an numeric value and save the result in the session |
setSessionString |
( |
$ |
aName, |
|
|
$ |
aValue |
|
) |
|
|
|
private helper function save a string in the session |
|
Trace a message into the containers logfile.
- Parameters:
-
| $iLvl | [i] trace level, range 1 .. 5 |
| $msg | [i] String message, the text to write |
- Note:
- trace will write the message to the default PHP logging feature
|
Variable Documentation
$hasOptionsScript = FALSE |
|
|
Global TraceLevel, range 0 ... 5, 0 logs nothing, 5 logs most.
|