MidCOM Global Variables

From OpenPSA Wiki

Jump to: navigation, search

In addition to the MidCOM PHP Superglobal, the MidCOM framework also defines a number of global variables which are accessible via the $GLOBALS PHP Superglobal. They have been used to make information and functionality available to Midgard objects like Style Elements or Snippets (after MidCOM startup). Starting with Midgard 1.6.0, they were superceded by the Midgard PHP Superglobal

  • $GLOBALS['midcom'] - the main midcom_application class (alias to the MidCOM PHP Superglobal)
  • $GLOBALS['midcom-cache']
  • $GLOBALS['midcom_component_data'] - This is a Component specific global data storage area, which should be used for stuff like default configurations. Each component has its own array in the global one. The component-specific arrays are indexed by their name.
  • $GLOBALS['midcom_config'] - default MidCOM Configuration
  • $GLOBALS['midcom_config_default']
  • $GLOBALS['midcom_config_local'] - server-wide MidCOM Configuration
  • $GLOBALS['midcom_config_site'] - site-specific MidCOM Configuration
  • $GLOBALS['midcom_debugger'] - The MidCOM Logging interface. It is actually a full-blown logging solution which should not be turned off any longer. Instead, step up the error reporting level to something above MIDCOM_LOG_DEBUG.
  • $GLOBALS['midcom_errstr'] - The last non-critical MidCOM error message. This is slowly superceded by having all errors call generate_error
  • $GLOBALS['midcom_services_i18n__l10n_localedb']
  • $GLOBALS['midcom_style_inherited']
  • $GLOBALS['midcom_version'] - MidCOM version string
Personal tools