system

System Class provided by System to start the environment (system clock & config aswell as optional includes) and handles the Systemwide Database Credentials

package

SYSTEM

Methods

Returns the Database Connection from System Config.

getSystemDBInfo() : object
static

Supports MYSQL and PostgreSQL

Response

object

Returns \SYSTEM\DB\DBInfoPG or \SYSTEM\DB\DBInfoMYS depending on configrated Database.

Check if the System-Environment-Wide Database Connection is MYSQL or PostgreSQL

isSystemDbInfoPG() : boolean
static

Response

boolean

Returns true if Databaseconnection is PostgreSQL else false.

Register the Database Writer Error Handle which will write all Catched SystemExceptions to the Database

register_errorhandler_dbwriter() : null
static

Response

null

Returns null

Register the JSON Output Error Handle which will print all Errors as JSON to the caller

register_errorhandler_jsonoutput() : null
static

Response

null

Returns null

Start the System Environment. This Function sums up many things needed to be done after include of the autoload file.

start(array $config, boolean $short_exc = true, boolean $short_res = true, boolean $error_db = true, boolean $error_json = true) : null
static

Flushes given Config values Starts the internal clock. Sets Error-reporting level according to config (opt)Allows to turn off optional includes which pollute global Namespace. (opt)Register Error-Handler-DB-Writer to log System Events to the Database (opt)Register Error-Handler-JSON-Output to return Errors as JSON.

Config has following format array( array(ID, VALUE), array(ID, VALUE)) For IDs @see \SYSTEM\CONFIG\config_ids Extend this class to define your own.

Arguments

$config

array

Configuration Array passed upon Enviroment Start

$short_exc

boolean

Include Shortcut for System Log Classes in global Namespace

$short_res

boolean

Include Shortcut for System Result Classes in global Namespace

$error_db

boolean

Include Shortcut for System Log Classes in global Namespace

$error_json

boolean

Include Shortcut for System Log Classes in global Namespace

Response

null

Returns null.