This section describes the structure of Midgard's person objects.
Most object members map directly to the record fields described before. Some of them are read-only and can only be changed using a special function (see below), others are derived from one or more record fields and only provided for your convenience (name, rname, homepagelink, emaillink).
The functions listed within the object definition are the object methods that are available for the object. Usage information about those methods and common information about Midgard objects can be found in the Objects and Methods chapter.
// MidgardPerson: Object Prototype for full instances class MidgardPerson { // Basic record data (read/write) var $id; var $firstname; var $lastname; var $birthdate; var $street; var $postcode; var $city; var $homephone; var $handphone; var $workphone; var $homepage; var $email; var $extra; var $img; var $topic; var $subtopic; var $department; var $office; var $created; var $creator; var $pgpkey; // Login information (modify with mgd_update_password() // and mgd_update_password_plain() functions) var $username; var $password; // read-protected // Public fields flags: If set to FALSE, only $username or // an admin-level user can view address, phone etc. fields // (modify with mgd_update_public()) var $addressp; var $phonep; var $homepagep; var $emailp; var $extrap; // Derived fields for convenience (read-only) var $name; // "$firstname $lastname" var $rname; // "$lastname, $firstname" var $homepagelink; // Anchor tag to the $homepage var $emaillink; // Anchor tag to mailto:$email var $sitegroup; // Public methods function create(); function update(); function delete(); function createattachment(); function updateattachment(); function deleteattachment(); function getattachment(); function listattachments(); function openattachment(); function serveattachment(); function listparameters(); function parameter(); function searchparameters(); function getsitegroup(); function setsitegroup(); } |