Midgard global PHP functions
- Authentication functions
- Command-line functions
- Debugging functions
- Formatting and style engine
- Informative functions
- Multilingual functions
The new Midgard API is mostly object-oriented. However, there are some global functions for changing state of the system.
Authentication functions
- mgd_auth_midgard - authenticate into the Midgard system
- mgd_unsetuid - return to initial authentication state
- mgd_issetuid - check if authentication state has been altered during runtime
Command-line functions
- mgd_config_init - initialize a Midgard database connection from configuration file
Debugging functions
- mgd_errstr - get latest Midgard status message
- mgd_errno - get latest Midgard status code
- mgd_debug_start - start logging Midgard I/O operations
- mgd_debug_stop - end logging Midgard I/O operations
Formatting and style engine
- mgd_include_snippet - include and execute a code snippet
- mgd_preparse - parse string according to Midgard Templating Engine rules
- mgd_format - pass string through Midgard custom formatters
Informative functions
- mgd_version - get current Midgard version number
- mgd_get_midgard - get copy of the Midgard object
- mgd_is_guid - check whether a string is a valid GUID (UUID format)
Multilingual functions
- mgd_set_lang - set content language of current request
- mgd_get_lang - get content language of current request
- mgd_set_default_lang - set fall-back language of current request
- mgd_get_default_lang - get fall-back language of current request
These functions are only Midgard functions that remain in the Midgard 1.9/2.0 branch. All other functions have been deprecated and removed.
