Open Source Content Management Framework

mgd_get_midgard

  1. Description

mgd_get_midgard -- Entry point to the midgard system

Description

`object **mgd_get_midgard** (void)`

Minimum version: Midgard 1.0

This function is used internally by Midgard. The initialization code in the root file creates the global object $midgard by calling the mgd_get_midgard() function. The root file is the file defined in the httpd.conf of Apache.

In addition the function can be called to refresh Midgard's internal information after an in-page authentication change associated with a mgd_auth_midgard() or mgd_unsetuid() call.

The midgard object is filled with information of the current request.

  • host : ID of the host used

  • style : ID of the style used

  • page : ID of the current page

  • auth : TRUE if authentication required

  • author : ID of the page author

  • user : current user id

  • admin : TRUE if user is administrator

  • argc : argument count (same as $argc)

  • argv : arguments (same as $argv)

  • uri : the path of the current request

  • self : the path to the current page. This is equal to uri for non-active pages

  • sitegroup: ID of the current sitegroup

Since Midgard 1.6.1 this function also provides global php array $_MIDGARD filled with the same values.

Designed by Nemein, hosted by Anykey