VERSION_MAJOR = 2
which version is this? even if we are unreleased, keep track of internal version-to-be developers need to set this in code. The user-displayed string is generated into $CAT_VERSION_STRING and $CAT_COPYRIGHT below
Define some variables which need to be globally accessible and some general purpose methods
DEFAULTS = [[SETTING => CONFIG[APPEARANCE][from-mail], DEFVALUE => firstname.lastname@example.org, COMPLAINTSTRING => APPEARANCE/from-mail , REQUIRED => FALSE], [SETTING => CONFIG[APPEARANCE][support-contact][url], DEFVALUE => email@example.com?body=Only%20English%20language%20please!, COMPLAINTSTRING => APPEARANCE/support-contact/url , REQUIRED => FALSE], [SETTING => CONFIG[APPEARANCE][support-contact][display], DEFVALUE => firstname.lastname@example.org, COMPLAINTSTRING => APPEARANCE/support-contact/display , REQUIRED => FALSE], [SETTING => CONFIG[APPEARANCE][support-contact][developer-mail], DEFVALUE => email@example.com, COMPLAINTSTRING => APPEARANCE/support-contact/mail , REQUIRED => FALSE], [SETTING => CONFIG[APPEARANCE][abuse-mail], DEFVALUE => firstname.lastname@example.org, COMPLAINTSTRING => APPEARANCE/abuse-mail , REQUIRED => FALSE], [SETTING => CONFIG[APPEARANCE][MOTD], DEFVALUE => Release Candidate. All bugs to be shot on sight!, COMPLAINTSTRING => APPEARANCE/MOTD , REQUIRED => FALSE], [SETTING => CONFIG[APPEARANCE][webcert_CRLDP], DEFVALUE => [list, of, CRL, pointers], COMPLAINTSTRING => APPEARANCE/webcert_CRLDP , REQUIRED => TRUE], [SETTING => CONFIG[APPEARANCE][webcert_OCSP], DEFVALUE => [list, of, OCSP, pointers], COMPLAINTSTRING => APPEARANCE/webcert_OCSP , REQUIRED => TRUE], [SETTING => CONFIG[DB][INST][host], DEFVALUE => db.host.example, COMPLAINTSTRING => DB/INST , REQUIRED => TRUE], [SETTING => CONFIG[DB][INST][host], DEFVALUE => db.host.example, COMPLAINTSTRING => DB/USER , REQUIRED => TRUE], [SETTING => CONFIG[DB][EXTERNAL][host], DEFVALUE => customerdb.otherhost.example, COMPLAINTSTRING => DB/EXTERNAL , REQUIRED => FALSE]]
$knownFederations : mixed|string|int
all known federation, in an array with ISO short name as an index, and localised version of the pretty-print name as value.
The static value is only filled with meaningful content after the first object has been instantiated. That is because it is not possible to define static properties with function calls like _().
$test_result : mixed|string|int
This array is used to return the test results.
As the 'global' entry it returns the maximum return value from all tests. Individual tests results are teturned as separate entires indexed by test names; each value is an array passing "level" and "message" from each of the tests. $test_result is set by the test_return method
listAllIdentityProviders( activeOnly, country) : mixed|string|int
Lists all identity providers in the database adding information required by DiscoJuice.
if set to non-zero will cause listing of only those institutions which have some valid profiles defined.
if set, only list IdPs in a specific country
the list of identity providers
printCountryList( activeOnly) : mixed|string|int
Prepares a list of countries known to the CAT.
is set and nonzero will cause that only countries with some institutions underneath will be listed
Array indexed by (uppercase) lang codes and sorted according to the current locale
getExternalDBEntityDetails( externalId, realm = NULL) : mixed|string|int
get additional details about an institution from the EXTERNAL customer DB (if any; for eduroam, this would be the official eduroam database)
the ID of the institution in the external DB
the function can also try to find an inst by its realm in the external DB
a list of institutions, ideally with only one member
getAttributeValue(mixed|string|int attributeArray, string|int index1, string|int index2) :
This is a helper fuction to retrieve a value from two-dimensional arrays The function tests if the value for the first indes is defined and then the same with the second and finally returns the value if something on the way is not defined, NULL is returned
createTemporaryDirectory( purpose = installer, failIsFatal = 1) : mixed|string|int
create a temporary directory and return the location
one of 'installer', 'logo', 'test' defined the purpose of the directory
decides if a creation failure should cause an error; defaults to true
the tuple of: base path, absolute path for directory, directory name
run_tests(mixed|string|int Tests) :
The multiple tests wrapper
the tests array.
The $Tests is a simple string array, where each entry is a test name the test names can also be given in the format "test=>subtest", which defines a conditional execution of the "subtest" if the "test" was run earier and returned a success.