GetInfo function in DD
| Newsgroups | gmane.comp.cms.xaraya.devel |
|---|---|
| Organization | Xaraya |
| Message-ID | <[email protected]> |
In the latest round of pushes to jamaica the function
dynamicdata_user_getinfo has been removed. This is simply a wrapper
function and folks using it should replace it with
DataObjectMaster::getInfo()
Apart from being consistent with the overall trend to replace function
calls with static method calls where possible, in this case the function
itself is becoming less important.
In most cases dynamicdata_user_getinfo is used to get the information
required for a subsequent call to create a data object instance. This is
especially true when you want to create an object by specifying its
module and itemtype. However, since in jamaica you can simply specify
the name of the object to create it, the module-cum-itemtype method is
becoming less important (and will eventually be dropped). Rather, the
easiest way to create an object is
DataObjectMaster::getObject(array('name' => 'foo'))
The dynamicdata_user_getinfo function returns an array of information
about the object. It is really just the information contained in the
object's entry in the dynamicdata_objects table. If one really needs
this sort of information the recommended way is to get it from the
object directly.
Marc