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!
- craigh responded to »TagIt 3.0 for Zikula« 03:58 PM
- jmvaughn responded to »error when i try to upgrade to the last version of dizkus module (3.1)« 12:05 PM
- localrags responded to »Remove contents of nuke_sc_anticracker from Database« 11:30 AM
- jmvaughn responded to »Shoutit for zikula 1.3?« 09:31 AM
- mdee responded to »Different page content under one template (tpl file) based on URL« 07:17 AM
- espaan responded to »Categories disappear when editing ...« 08. Feb
- eledril responded to »How decrease zikula cpu usage« 08. Feb
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Object Attributes
-
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
-
- Rank: Team Member
- Registered: Jan 19, 2003
- Last visit: Apr 06, 2010
- Posts: 432
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 -
- Rank: Team Member
- Registered: Jan 05, 2003
- Last visit: May 28, 2010
- Posts: 766
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
- Moderated by:
- Support
