Fork me on GitHub

Object Attributes  Bottom

  • From this post: http://community.pos…pic-topic-53102.htm

    Cool!!!

    But I just can't figure out what the origional $obj is supposed to be. The ObjUtil class simply says "@param object The object whose attribute we wish to...". Is this supposed to be the actuall table object as gotten from DBUtil::selectObjectArray() for the table the attributes belong to? Or the calling modules resulting object? Or what?

    Any help here would be greatly appreciated.

    --
    Under Construction!
  • If you want to use attributes you want to enhance existing objects with additional information without having to manipulate their database scheme. So if you for example add new fields to a user, then the object is a result of a DBUtil method selecting an entry from the users table.
    The reason behind this approach is that any object enhancements (like attributes, metadata, categories, ASO) are handled centrally in DBUtil when the object is being updated itself. So a DBUtil method needs any extensions as a subarray within the object passed to it.

    --
    Guite | ModuleStudio
  • Hi,

    $obj is a (either single or array of data arrays) associative data array returned from DBUtil::selectObjectArray(). ObjectUtil will deal with it accordingly ... ObjectUtil alters the object in place so the stuff is automagically added to the object you pass in.

    Greetings
    R
  • 0 users

This list is based on users active over the last 60 minutes.