Constants

L_OK

L_OK = 0

L_REMARK

L_REMARK = 4

L_WARN

L_WARN = 32

L_ERROR

L_ERROR = 256

VERSION_MAJOR

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

VERSION_MINOR

VERSION_MINOR = 0

VERSION_PATCH

VERSION_PATCH = 0

VERSION_EXTRA

VERSION_EXTRA = alpha2

RELEASE_VERSION

RELEASE_VERSION = FALSE

USER_API_VERSION

USER_API_VERSION = 2

DB_TYPE

DB_TYPE = INST

the default database to query in this class.

Properties

$CAT_VERSION_STRING

$CAT_VERSION_STRING : 

Type

$CAT_COPYRIGHT

$CAT_COPYRIGHT : 

Type

$nomenclature_fed

$nomenclature_fed : 

the custom displayable variant of the term 'federation'

Type

$nomenclature_inst

$nomenclature_inst : 

the custom displayable variant of the term 'institution'

Type

$knownFederations

$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 _().

Type

mixed|string|int — of all known federations

$loggerInstance

$loggerInstance : \core\common\Logging

We occasionally log stuff (debug/audit). Have an initialised Logging instance nearby is sure helpful.

Type

\core\common\Logging —

$languageInstance

$languageInstance : \core\common\Language

access to language settings to be able to switch textDomain

Type

\core\common\Language —

Methods

__construct()

__construct() 

Constructor sets the language by calling set_lang and stores language settings in object properties

Logs the start of lifetime of the entity to the debug log on levels 3 and higher.

__destruct()

__destruct() 

destroys the entity.

Logs the end of lifetime of the entity to the debug log on level 5.

createTemporaryDirectory()

createTemporaryDirectory(  purpose = installer,   failIsFatal = 1) : mixed|string|int

create a temporary directory and return the location

Parameters

purpose

one of 'installer', 'logo', 'test' defined the purpose of the directory

failIsFatal

decides if a creation failure should cause an error; defaults to true

Returns

mixed|string|int —

the tuple of: base path, absolute path for directory, directory name

rrmdir()

rrmdir(  dir) 

this direcory delete function has been copied from PHP documentation

Parameters

dir

name of the directory to delete

totalIdPs()

totalIdPs(  level) : 

Calculates the number of IdPs overall in the system

Parameters

level

completeness level of IdPs that are to be taken into consideration for counting

Returns

listAllIdentityProviders()

listAllIdentityProviders(  activeOnly,   country) : mixed|string|int

Lists all identity providers in the database adding information required by DiscoJuice.

Parameters

activeOnly

if set to non-zero will cause listing of only those institutions which have some valid profiles defined.

country

if set, only list IdPs in a specific country

Returns

mixed|string|int —

the list of identity providers

printCountryList()

printCountryList(  activeOnly) : mixed|string|int

Prepares a list of countries known to the CAT.

Parameters

activeOnly

is set and nonzero will cause that only countries with some institutions underneath will be listed

Returns

mixed|string|int —

Array indexed by (uppercase) lang codes and sorted according to the current locale

getExternalDBEntityDetails()

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)

Parameters

externalId

the ID of the institution in the external DB

realm

the function can also try to find an inst by its realm in the external DB

Returns

mixed|string|int —

a list of institutions, ideally with only one member

getExternalCountriesList()

getExternalCountriesList() : mixed|string|int

the list of countries as per external DB

Returns

mixed|string|int —

the list

getRootUrlPath()

getRootUrlPath()