CORE POS - IS4C
The CORE POS front end
|
Static Public Member Functions | |
static | whoami () |
static | checkWritable ($filename, $optional=False, $template=False) |
static | confsave ($key, $value, $prefer_local=false) |
static | confRemove ($key, $local=false) |
static | confExists ($key, $local=False) |
static | paramSave ($key, $value) |
static | loadSampleData ($sql, $table, $quiet=false) |
static | dbTestConnect ($host, $type, $db, $user, $pw) |
static | duplicateStructure ($dbms, $table1, $table2) |
static | createIfNeeded ($con, $dbms, $db_name, $table_name, $stddb, &$errors=array()) |
static | dbStructureModify ($sql, $struct_name, $queries, &$errors=array()) |
static | normalizeDbName ($name) |
static | installTextField ($name, $default_value='', $storage=self::EITHER_SETTING, $quoted=true, $attributes=array()) |
static | installSelectField ($name, $options, $default_value='', $storage=self::EITHER_SETTING, $quoted=true, $attributes=array()) |
static | installCheckboxField ($name, $label, $default_value=0, $storage=self::EITHER_SETTING, $choices=array(0, 1)) |
static | validateConfiguration () |
static | createOpDBs ($db, $name) |
static | createTransDBs ($db, $name) |
static | createMinServer ($db, $name) |
Public Attributes | |
const | INI_SETTING = 1 |
const | PARAM_SETTING = 2 |
const | EITHER_SETTING = 3 |
|
static |
Remove a value from config file(s)
$key | string key |
$local | boolean optional default false remove from ini-local.php if applicable |
|
static |
Save entry to config file(s)
$key | string key |
$value | string value |
$prefer_local | use ini-local if it exists |
Values are written to a file and must be valid PHP code. For example, a PHP string should include single or double quote delimiters in $value.
|
static |
Create opdata tables and views
$db | [SQLManager] database connection |
$name | [string] database name |
|
static |
Create translog tables and views
$db | [SQLManager] database connection |
$name | [string] database name |
Not using models for receipt views. Hopefully many of these can go away as deprecated.
|
static |
Render configuration variable as an <select> tag Process any form submissions Write configuration variable to config.php
$name | [string] name of the variable |
$options | [array] list of options This can be a keyed array in which case the keys are what is written to config.php and the values are what is shown in the user interface, or it can simply be an array of valid values. |
$default_value | [mixed, default empty string] default value for the setting |
$quoted | [boolean, default true] write value to config.php with single quotes |
|
static |
Render configuration variable as an <input> tag Process any form submissions Write configuration variable to config.php
$name | [string] name of the variable |
$default_value | [mixed, default empty string] default value for the setting |
$quoted | [boolean, default true] write value to config.php with single quotes |
$attributes | [array, default empty] array of <input> tag attribute names and values |
If default is array, value is probably supposed to be an array Split quoted values on whitespace, commas, and semicolons Split non-quoted values on non-numeric characters
|
static |
Load sample data into the table
$sql | [SQLManager object] connected to database |
$table | [string] table name |
$quiet | [boolean, default false] suppress output |
alternate implementation
for non-mysql and/or LOAD DATA LOCAL not allowed
|
static |
Save value to the parameters table.
|
static |
Opposite of normal. Load the parameters table values first, then include ini.php second. If the resulting $CORE_LOCAL does not match the paramters table, that means ini.php overwrote a setting with a different value.
Again backwards. Check lane-specific parameters first
Now check global parameters
Finally, re-save any conflicting values. This should rewrite them in ini.php if that file is writable.