XIV. Parameters Reference

Midgard uses object parameters to attach named values to any Midgard object. The parameters are grouped into parameter domains which are freely chooseable strings. After an object is retrieved with mgd_get_<object> the parameters will be defined on that object as $object->domain_name. To manipulate the parameters on an object two methods will be available on the object after the 'get'.

1. Parameter Record Definition

A parameter record contains information about a parameter, its domain, and the midgard object it is attached to.

Fields of a parameter record

id

The id of the parameter record.

table

The name of the table the parent object is in.

oid

The id of the parent record.

domain

The domain of the parameter record.

name

The name of the parameter record.

value

The value of the parameter record.

sitegroup

The id of the sitegroup the parameter record belongs to.

2. Parameter Object Definition

This section describes the contents of parameter objects. Most object parameters map directly to the record fields described above.

/* Parameter Object Prototype */

Class parameter {

  var $N;     # Only with mgd_list_XXX functions.
  var $id;
  var $domain;
  var $name;
  var $value;

}

3. Parameters functions

The are no functions that manipulate the parameter objects directly. Instead, object methods are called from the ojbect the parameter is related to. See $object->parameter and $object->listparameters.