Index: openacs-4/packages/acs-tcl/tcl/object-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/object-procs.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/acs-tcl/tcl/object-procs.tcl 21 Oct 2003 22:23:24 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/object-procs.tcl 15 Dec 2003 15:49:56 -0000 1.4.2.1 @@ -11,37 +11,38 @@ namespace eval acs_object {} ad_proc -private acs_lookup_magic_object { name } { + Non memoized version of acs_magic_object. - Returns the object ID of a magic object (performing no memoization). + @return the magic object's object ID + @see acs_magic_object } { return [db_string magic_object_select { select object_id from acs_magic_objects where name = :name }] } -ad_proc acs_magic_object { name } { - +ad_proc -public acs_magic_object { name } { Returns the object ID of a magic object. @param name the name of the magic object (as listed in the acs_magic_objects table). @return the object ID. - @error if no object exists with that magic name. + @error if no object exists with that magic name. } { return [util_memoize [list acs_lookup_magic_object $name]] } -ad_proc acs_object_name { object_id } { +ad_proc -public acs_object_name { object_id } { Returns the name of an object. } { return [db_string object_name_get {}] } -ad_proc acs_object_type { object_id } { +ad_proc -public acs_object_type { object_id } { Returns the type of an object. @@ -53,25 +54,34 @@ } -default ""] } -ad_proc acs_object::get { +ad_proc -public acs_object::get { {-object_id:required} {-array:required} } { Gets information about an acs_object. - @array The name of an array in the caller's namespace where the info should be delivered. + Returns object_id, object_type, context_id, security_inherit_p, + creation_user, creation_date_ansi, creation_ip, last_modified_ansi, + modifying_user, modifying_ip, tree_sortkey, object_name + + @param array An array in the caller's namespace into which the info should be delivered (upvared) } { upvar 1 $array row db_1row select_object {} -column_array row } -ad_proc acs_object::get_element { +ad_proc -public acs_object::get_element { {-object_id:required} {-element:required} } { Gets a specific element from the info returned by acs_object::get. + @param object_id the object to get data for + @param element the field to return + + @return the value of the specified element + @see acs_object::get } { acs_object::get -object_id $object_id -array row