CORE POS - IS4C
The CORE POS front end
|
Public Member Functions | |
check ($str) | |
parse ($str) | |
default_json () | |
isLast () | |
isFirst () | |
doc () | |
Static Public Member Functions | |
static | get_parse_chain () |
The base module for parsing input
Enabled Parser modules are checked until one matches the input. Input processing ceases and the matching module must decide what to do next.
Parser::check | ( | $str) |
Check whether the module handles this input
$str | The input string |
Parser::default_json | ( | ) |
A return array for parse() with proper keys
See parse() method
Parser::doc | ( | ) |
Display documentation
Ideally you should note what your module it does and what the input format is.
|
static |
Gather parse modules
Scan the parse directory for module files. Return an array of available modules.
Parser::isFirst | ( | ) |
Make this module first
Modules are not run in any guaranteed order. Return True will force this module to be first (or nearly first if multiple modules override this method)
Parser::isLast | ( | ) |
Make this module last
Modules are not run in any guaranteed order. Return True will force this module to be last.
BE VERY VERY CAREFUL IF YOU OVERRIDE THIS. Quantity is the last preparse module and DefaultTender is the last parse module. Making your own module last will break one of these and probably make a mess.
Parser::parse | ( | $str) |
Deal with the input
$str | The input string |
Parse modules a keyed array:
trans_num string current transaction identifier
The utility method default_json() provides an array with the proper keys and sane default values.