Changeset 14381

Show
Ignore:
Timestamp:
01/12/08 11:50:03 (9 months ago)
Author:
flack
Message:

PHPdoc fixes and improvements

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.admin.folder/handler/metadata.php

    r14329 r14381  
    2121     * 
    2222     * @access private 
    23      * @var $_object mixed Object for metadata editing 
     23     * @var mixed Object for metadata editing 
    2424     */ 
    2525    var $_object = null; 
     
    2929     * 
    3030     * @access private 
    31      * @var $_controller midcom_helper_datamanager2_controller 
     31     * @var midcom_helper_datamanager2_controller 
    3232     */ 
    3333    var $_controller = null; 
     
    3737     * 
    3838     * @access private 
    39      * @var $_schemadb midcom_helper_datamanager2_schema 
     39     * @var midcom_helper_datamanager2_schema 
    4040     */ 
    4141    var $_schemadb = null; 
  • trunk/midcom/midcom.admin.folder/handler/move.php

    r14140 r14381  
    2121     * 
    2222     * @access private 
    23      * @var $_object mixed Object for move editing 
     23     * @var mixed Object for move editing 
    2424     */ 
    2525    var $_object = null; 
  • trunk/midcom/midcom.admin.libconfig/midcom/interfaces.php

    r13809 r14381  
    11<?php 
     2/** 
     3 * @package midcom.admin.libconfig 
     4 * @author The Midgard Project, http://www.midgard-project.org  
     5 * @version $Id$ 
     6 * @copyright The Midgard Project, http://www.midgard-project.org 
     7 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 
     8 */ 
     9 
    210/** 
    311 * Library configuration Interface Class. This is a pure code library. 
  • trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php

    r14329 r14381  
    3939     * 
    4040     * Separated so that dbfactory->import() can reuse the code 
    41      *  
    42      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     41     * 
     42     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    4343     * @return boolean Indicating success. 
    4444     */ 
     
    7373     * 4. void $object->_on_updated() is executed to notify the class from a successful DB update. 
    7474     * 
    75      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     75     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    7676     * @return boolean Indicating success. 
    7777     */ 
     
    107107     * 
    108108     * Separated so that dbfactory->import() can reuse the code 
    109      *  
    110      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     109     * 
     110     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    111111     */ 
    112112    function update_post_ops(&$object) 
     
    116116        midcom_baseclasses_core_dbobject::_rewrite_timestamps_to_unixdate($object); 
    117117 
    118         if ($object->_use_rcs)  
     118        if ($object->_use_rcs) 
    119119        { 
    120120            $rcs =& $_MIDCOM->get_service('rcs'); 
     
    123123 
    124124        $object->_on_updated(); 
    125          
     125 
    126126        $_MIDCOM->cache->invalidate($object->guid); 
    127          
     127 
    128128        if ($GLOBALS['midcom_config']['attachment_cache_enabled']) 
    129129        { 
     
    145145            mgd_cache_invalidate(); 
    146146        } 
    147          
     147 
    148148        $_MIDCOM->componentloader->trigger_watches(MIDCOM_OPERATION_DBA_UPDATE, $object); 
    149149        debug_pop(); 
     
    155155     * record if the corresponding fields exists. 
    156156     * 
    157      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     157     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    158158     * @access private 
    159159     */ 
     
    181181 
    182182    /** 
    183      * This is an internal helper which updates the created and metadata.published timestamps  
     183     * This is an internal helper which updates the created and metadata.published timestamps 
    184184     * and the creator and metadata.authors links on a record if the corresponding fields exists. 
    185185     * 
    186      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     186     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    187187     * @access private 
    188188     */ 
     
    190190    { 
    191191        debug_push_class($object, __FUNCTION__); 
    192          
     192 
    193193        if (array_key_exists('creator', $object)) 
    194194        { 
    195195            // Bypass MidCOM ACL here, at least for now. 
    196196            if (is_null($_MIDCOM->auth->user)) 
    197             {         
     197            { 
    198198                $object->creator = 0; 
    199199            } 
     
    203203            } 
    204204        } 
    205          
     205 
    206206        if (array_key_exists('created', $object)) 
    207207        { 
    208208            $object->created = time(); 
    209209        } 
    210          
     210 
    211211        if (!is_null($_MIDCOM->auth->user)) 
    212212        { 
     
    217217                $object->metadata->authors = "|{$_MIDCOM->auth->user->_storage->guid}|"; 
    218218            } 
    219          
     219 
    220220            // Default the owner to first group of current user 
    221221            if (!$object->metadata->owner) 
     
    227227                    $object->metadata->owner = str_replace('group:', '', $first_group->id); 
    228228                } 
    229             }          
    230         } 
    231               
     229            } 
     230        } 
     231 
    232232        // Default the publication time to current date/time 
    233233        if (!$object->metadata->published) 
     
    235235            $object->metadata->published = time(); 
    236236        } 
    237          
     237 
    238238        debug_pop(); 
    239239    } 
     
    243243     * This is essentially sets the midgard:owner privilege for the current user. 
    244244     * 
    245      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     245     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    246246     * @access private 
    247247     */ 
     
    279279     * 
    280280     * Separated so that dbfactory->import() can reuse the code 
    281      *  
    282      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     281     * 
     282     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    283283     */ 
    284284    function create_pre_checks(&$object) 
     
    314314            return false; 
    315315        } 
    316          
     316 
    317317        debug_pop(); 
    318318        return true; 
     
    329329     * 4. void $object->_on_created() is executed to notify the class from a successful DB creation. 
    330330     * 
    331      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     331     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    332332     * @return boolean Indicating success. 
    333333     */ 
     
    342342            return false; 
    343343        } 
    344          
     344 
    345345        // Legacy Midgard Metadata emulation 
    346346        // Now, if possible, set created and creator. 
    347347        midcom_baseclasses_core_dbobject::_set_creator($object); 
    348348        midcom_baseclasses_core_dbobject::_set_revisor($object); 
    349          
     349 
    350350        midcom_baseclasses_core_dbobject::_rewrite_timestamps_to_isodate($object); 
    351351 
     
    369369     * 
    370370     * Separated so that dbfactory->import() can reuse the code 
    371      *  
    372      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     371     * 
     372     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    373373     */ 
    374374    function create_post_ops(&$object) 
     
    407407        $object->_on_created(); 
    408408        $_MIDCOM->componentloader->trigger_watches(MIDCOM_OPERATION_DBA_CREATE, $object); 
    409         if ($object->_use_rcs)  
     409        if ($object->_use_rcs) 
    410410        { 
    411411            $rcs =& $_MIDCOM->get_service('rcs'); 
    412412            $rcs->update(&$object, $object->get_rcs_message()); 
    413413        } 
    414          
     414 
    415415        $parent = $object->get_parent(); 
    416416        if (   $parent 
     
    420420            $_MIDCOM->cache->invalidate($parent->guid); 
    421421        } 
    422          
     422 
    423423        // Invalidate Midgard pagecache if we touched style/page element 
    424424        if (   function_exists('mgd_cache_invalidate') 
     
    438438     * 
    439439     * Separated so that dbfactory->import() can reuse the code 
    440      *  
    441      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     440     * 
     441     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    442442     */ 
    443443    function delete_pre_checks(&$object) 
     
    475475     * 5. void $object->_on_deleted() is executed to notify the class from a successful DB deletion. 
    476476     * 
    477      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     477     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    478478     * @return boolean Indicating success. 
    479479     */ 
     
    540540     * 
    541541     * Separated so that dbfactory->import() can reuse the code 
    542      *  
    543      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     542     * 
     543     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    544544     */ 
    545545    function delete_post_ops(&$object) 
     
    549549        $object->_on_deleted(); 
    550550        $_MIDCOM->componentloader->trigger_watches(MIDCOM_OPERATION_DBA_DELETE, $object); 
    551         if ($object->_use_rcs)  
     551        if ($object->_use_rcs) 
    552552        { 
    553553            $rcs =& $_MIDCOM->get_service('rcs'); 
    554554            $rcs->update(&$object, $object->get_rcs_message()); 
    555555        } 
    556          
     556 
    557557        $_MIDCOM->cache->invalidate($object->guid); 
    558558 
     
    573573     * Copies values from oldobject to newobject in case the types are compatible 
    574574     * 
    575      * @param MidgardObject $newobject A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    576      * @param MidgardObject $oldobject a parent object (usually a midgard_* base class) which to copy. 
     575     * @param MidgardObject &$newobject A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     576     * @param MidgardObject &$oldobject a parent object (usually a midgard_* base class) which to copy. 
    577577     * @return boolean Indicating success. 
    578578     */ 
     
    617617     * This method is usually only called from the constructor of the class. 
    618618     * 
    619      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     619     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    620620     * @param mixed $id The object to load from the database. This can be either null (the default), indicating an empty object, 
    621621     *     a Midgard database row-ID or a Midgard GUID, the latter is detected using mgd_is_guid(). In addition, you can 
     
    682682            return false; 
    683683        } 
    684          
     684 
    685685        return midcom_baseclasses_core_dbobject::post_db_load_checks($object); 
    686686    } 
     
    689689     * After we instantiated the midgard object do some post processing and ACL checks 
    690690     * 
    691      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     691     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    692692     * @return boolean Indicating success. 
    693693     * @see midcom_baseclasses_core_dbobject::load 
     
    704704            // TODO: Some other error code might be nicer here 
    705705            mgd_set_errno(MGD_ERR_ACCESS_DENIED); 
    706              
     706 
    707707            debug_push_class($object, __FUNCTION__); 
    708708            debug_add("Failed to load object, language {$object->lang} does not match Midgard's global language setting.", 
     
    735735            midcom_baseclasses_core_dbobject::_clear_object($object); 
    736736        } 
    737          
     737 
    738738        // Register the GUID as loaded in this request 
    739739        $_MIDCOM->cache->content->register($object->guid); 
    740          
     740 
    741741        return $result; 
    742742    } 
     
    755755     *    is in theory incorrect, but this is what is expected by the legacy applications. 
    756756     * 
    757      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     757     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    758758     */ 
    759759    function _rewrite_timestamps_to_unixdate(&$object) 
     
    761761        $metadata_timestamps = array 
    762762        ( 
    763             'created',  
    764             'revised',  
    765             'exported',  
    766             'imported',  
    767             'approved',  
     763            'created', 
     764            'revised', 
     765            'exported', 
     766            'imported', 
     767            'approved', 
    768768            'published', 
    769769            'locked', 
     
    806806        } 
    807807    } 
    808      
     808 
    809809    /** 
    810810     * This function parses the loaded object and detects all meta timestamps of the original 
     
    813813     * It processes all metadata timestamps. 
    814814     * 
    815      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     815     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    816816     */ 
    817817    public static function rewrite_timestamps_to_datetime(&$object) 
     
    819819        $metadata_timestamps = array 
    820820        ( 
    821             'created',  
    822             'revised',  
    823             'exported',  
    824             'imported',  
    825             'approved',  
     821            'created', 
     822            'revised', 
     823            'exported', 
     824            'imported', 
     825            'approved', 
    826826            'published', 
    827827            'locked', 
     
    838838        } 
    839839    } 
    840      
     840 
    841841    /** 
    842842     * This function parses the loaded object and detects all meta timestamps of the original 
     
    845845     * It processes all metadata timestamps. 
    846846     * 
    847      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     847     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    848848     */ 
    849849    public static function rewrite_datetimes_to_timestamp(&$object) 
     
    851851        $metadata_timestamps = array 
    852852        ( 
    853             'created',  
    854             'revised',  
    855             'exported',  
    856             'imported',  
    857             'approved',  
     853            'created', 
     854            'revised', 
     855            'exported', 
     856            'imported', 
     857            'approved', 
    858858            'published', 
    859859            'locked', 
     
    882882     * 2. Zero timestamps are converted to the magic '0000-00-00 00:00:00' timestamp. 
    883883     * 
    884      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     884     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    885885     */ 
    886886    function _rewrite_timestamps_to_isodate(&$object) 
     
    888888        $metadata_timestamps = array 
    889889        ( 
    890             'created',  
    891             'revised',  
    892             'published',  
    893             'exported',  
    894             'imported',  
    895             'approved',  
     890            'created', 
     891            'revised', 
     892            'published', 
     893            'exported', 
     894            'imported', 
     895            'approved', 
    896896            'locked', 
    897897            'schedulestart', 
     
    918918        } 
    919919    } 
    920      
     920 
    921921    /** 
    922922     * Generates URL-safe name for an object and stores it if needed 
    923      *  
    924      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     923     * 
     924     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    925925     */ 
    926926    function generate_urlname($object, $titlefield = 'title') 
     
    930930            return false; 
    931931        } 
    932          
     932 
    933933        if (   !isset($object->$titlefield) 
    934934            || empty($object->$titlefield)) 
     
    936936            return false; 
    937937        } 
    938          
     938 
    939939        if (!$_MIDCOM->serviceloader->can_load('midcom_core_service_urlgenerator')) 
    940940        { 
    941941            return false; 
    942942        } 
    943          
     943 
    944944        $urlgenerator = $_MIDCOM->serviceloader->load('midcom_core_service_urlgenerator'); 
    945945        $name = $urlgenerator->from_string($object->$titlefield); 
     
    951951            return true; 
    952952        } 
    953          
     953 
    954954        $object->name = $name; 
    955955        $tries = 0; 
     
    973973     * On any failure, the object is cleared. 
    974974     * 
    975      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     975     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    976976     * @return boolean Indicating Success 
    977977     */ 
     
    985985     * The calling sequence is as with the corresponding constructor. 
    986986     * 
    987      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     987     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    988988     * @param int $id The id of the object to load from the database. 
    989989     * @return boolean Indicating Success 
     
    10301030     * The calling sequence is as with the corresponding constructor. 
    10311031     * 
    1032      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1032     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    10331033     * @param string $guid The guid of the object to load from the database. 
    10341034     * @return boolean Indicating Success 
     
    10751075     * The calling sequence is as with the corresponding constructor. 
    10761076     * 
    1077      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1077     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    10781078     * @param string $path The path of the object to load from the database. 
    10791079     * @return boolean Indicating Success 
     
    11211121     * permission check for example. 
    11221122     * 
    1123      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1123     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    11241124     * @access private 
    11251125     */ 
     
    11441144     * drop all privileges assigned to the given object. 
    11451145     * 
    1146      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1146     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    11471147     * @return boolean Indicating Success. 
    11481148     * @access private 
     
    11871187     * No event handlers are called here yet. 
    11881188     * 
    1189      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1189     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    11901190     * @param string $domain The parameter domain. 
    11911191     * @param string $name The parameter name. 
     
    12101210     * It is used by various other objects for parameter manipulation. 
    12111211     * 
    1212      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1212     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    12131213     * @param string $domain The parameter domain. 
    12141214     * @param string $name The parameter name. 
     
    12671267            debug_add("We have multiple results for parameter {$domain} / {$name} for {$object->__table__} ID {$object->id}: The query returned more then one result, this should not happen and is most probably a DB incosistency.", 
    12681268                MIDCOM_LOG_INFO); 
    1269              
     1269 
    12701270            $keep_parameter = null; 
    12711271            foreach ($result as $parameter) 
     
    12811281                } 
    12821282            } 
    1283              
     1283 
    12841284            debug_pop(); 
    12851285            return $keep_parameter; 
     
    13351335     * false will indicate a failure while querying the database. 
    13361336     * 
    1337      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1337     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    13381338     * @param string $domain The parameter domain to query, this may be null to indicate a full listing. 
    13391339     * @return Array Parameter list (see above for details) or false on failure. 
     
    13621362     * No event handlers are called here yet. 
    13631363     * 
    1364      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1364     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    13651365     * @param string $domain The parameter domain to query. 
    13661366     * @return Array Parameter listing or false on failure. 
     
    13731373        $mc->set_key_property('name'); 
    13741374        $mc->add_value_property('value'); 
    1375          
     1375 
    13761376        $mc->execute(); 
    1377          
     1377 
    13781378        $results = array(); 
    1379          
     1379 
    13801380        $params = $mc->list_keys(); 
    13811381        foreach ($params as $name => $param) 
     
    13831383            $results[$name] = $mc->get_subkey($name, 'value'); 
    13841384        } 
    1385          
     1385 
    13861386        return $results; 
    13871387    } 
     
    13921392     * No event handlers are called here yet. 
    13931393     * 
    1394      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1394     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    13951395     * @return Array Parameter listing or false on failure. 
    13961396     * @see list_parameters() 
     
    14021402        $mc->add_value_property('domain'); 
    14031403        $mc->add_value_property('name'); 
    1404         $mc->add_value_property('value');         
    1405          
     1404        $mc->add_value_property('value'); 
     1405 
    14061406        $mc->execute(); 
    1407          
     1407 
    14081408        $results = array(); 
    1409          
     1409 
    14101410        $params = $mc->list_keys(); 
    14111411        foreach ($params as $guid => $param) 
     
    14181418            $results[$domain][$mc->get_subkey($guid, 'name')] = $mc->get_subkey($guid, 'value'); 
    14191419        } 
    1420          
     1420 
    14211421        return $results; 
    14221422    } 
     
    14301430     * The user needs both update and parameter manipulation permission on the parent object for updates. 
    14311431     * 
    1432      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1432     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    14331433     * @param string $domain The Parameter Domain. 
    14341434     * @param string $name The Parameter name. 
     
    14991499     * The user needs both update and parameter manipulation permission on the parent object for updates. 
    15001500     * 
    1501      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1501     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    15021502     * @param string $domain The Parameter Domain. 
    15031503     * @param string $name The Parameter name. 
     
    15381538     * construction) and midgard:privileges) otherwise, the call will fail. 
    15391539     * 
    1540      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1540     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    15411541     * @return Array A list of midcom_core_privilege objects or false on failure. 
    15421542     */ 
     
    15661566     * combination suitable for usage with create_new_privilege_object() (see there). 
    15671567     * 
    1568      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1568     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    15691569     * @param mixed $privilege Either the full privilege object (midcom_core_privilege) to set or the name of the privilege (string). 
    15701570     *     If the name was specified, the other parameters must be specified as well. 
     
    15891589            return false; 
    15901590        } 
    1591          
     1591 
    15921592        // PONDER: will this cause issues with class based privileges ?? 
    15931593        /* yes 
     
    16281628     * Unset a privilege on an object (e.g. set it to INHERIT). 
    16291629     * 
    1630      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1630     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    16311631     * @param mixed $privilege Either the full privilege object (midcom_core_privilege) to set or the name of the privilege (string). 
    16321632     *     If the name was specified, the other parameters must be specified as well. 
     
    16901690     * Looks up a privilege by its parameters. 
    16911691     * 
    1692      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1692     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    16931693     * @param string $privilege The name of the privilege. 
    16941694     * @param mixed $assignee Either a valid magic assignee (SELF, EVERYONE, USERS, ANONYMOUS), a midcom_core_user or a 
     
    17231723     * Unsets all privilege on an object . 
    17241724     * 
    1725      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1725     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    17261726     * @return boolean Indicating success. 
    17271727     */ 
     
    17541754     * first match will be returned. 
    17551755     * 
    1756      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1756     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    17571757     * @param string $name The name of the attachment to look up. 
    17581758     * @return midcom_baseclasses_database_attachment The attachment found, or false on failure. 
     
    17901790     * first match will be deleted. 
    17911791     * 
    1792      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1792     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    17931793     * @param string $name The name of the attachment to delete. 
    17941794     * @return boolean Indicating success. 
     
    18221822     * Creates a new attachment at the current object and returns it for usage. 
    18231823     * 
    1824      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1824     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    18251825     * @param string $name The name of the attachment. 
    18261826     * @param string $title The title of the attachment. 
     
    18761876     * Creates a new attachment at the current object and returns it for usage. 
    18771877     * 
    1878      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1878     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    18791879     * @param string $name The name of the attachment. 
    18801880     * @param string $title The title of the attachment. 
     
    18991899     * Opens an attachment for File IO operations. 
    19001900     * 
    1901      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1901     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    19021902     * @param string $name The name of the attachment to look up. 
    19031903     * @param string $mode The mode which should be used to open the attachment, same as 
     
    19221922     * object. 
    19231923     * 
    1924      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1924     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    19251925     * @return midgard_query_builder Prepared QueryBuilder or false on failure. 
    19261926     */ 
     
    19481948     * attachments, an empty array is returned. 
    19491949     * 
    1950      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1950     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    19511951     * @return Array A list of midcom_baseclasses_database_attachment objects or false on failure. 
    19521952     */ 
     
    19741974     * Returns a fetchable of all attachments for the current object. 
    19751975     * 
    1976      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     1976     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    19771977     * @return object A fetchable which can be used to traverse the attachments to the object, or false on failure. 
    19781978     * @deprecated Deprecated since MidCOM 2.5.0 
     
    20012001     * silently return true. 
    20022002     * 
    2003      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     2003     * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    20042004     * @param mixed $person A midcom_baseclasses_database_person object or an identifier usable to retrieve one. You may set 
    20052005     *     this to NULL to use the currently authenticated user as a default. 
     
    20642064     * This call requires the <i>midgard:privileges</i> privilege. 
    20652065     * 
    2066      * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
     2066     * @param MidgardObject &$object A class inherit