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!
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
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: 442
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: 775
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
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
