Chapter 21. Article Object Definition

Midgard functions like mgd_get_article and mgd_list_topic_articles return objects upon success. This section describes the contents of those objects. Most object parameters map directly to the record fields described above. Only those object parameters that do not have such direct mapping will be explained further.

The functions listed within the object definition are the object methods that are available for the object. Usage information about those methods can be found in Object Methods.


/* Article Object Prototype */

Class article {

  var $N;   // Only available with objects returned by mgd_list_XXX functions.
  var $id;
  var $up;
  var $topic;
  var $name;
  var $title;
  var $abstract;
  var $content;
  var $author;
  var $date;    
  var $adate;   // Date format D b. Y (ex. 6th Aug 2000)
  var $aldate;  // Date format D M Y (ex. 6th August 2000)
  var $extra1;
  var $extra2;
  var $extra3;
  var $score;
  var $type;
  var $created;
  var $creator;
  var $revised;
  var $revisor;
  var $revision;
  var $approved;
  var $approver;
  var $url;
  var $icon;
  var $view;
  var $print;
  var $calendar;
  var $acalendar;  // Date format D b. Y
  var $alcalendar; // Date format D M Y
  var $startdate;
  var $enddate;
  var $calstart;
  var $calstop;

  function fetch();             // Only available with objects returned by mgd_list_XXX functions.

  function create();
  function update();
  function delete();

  function setsitegroup();
  function getsitegroup();

  function parameter();
  function listparameters();
  function searchparameters();

  function setscore();

  function settype();

  function createattachment();
  function updateattachment();
  function deleteattachment();
  function getattachment();
  function listattachment();
  function openattachment();
  function serveattachment();
}