[Midas] Fwd: item's parent info
Zach Mullen
zach.mullen at kitware.com
Thu Jul 5 22:08:03 EDT 2012
FWIW, this is implemented by trapping the method in __call()
http://www.php.net/manual/en/language.oop5.overloading.php#object.call
On Thu, Jul 5, 2012 at 8:44 PM, Michael Grauer
<michael.grauer at kitware.com>wrote:
> If you look in the base class for models, they'll define some properties
> that will have getters and setters automatically created for them. For
> example, in the FolderModelBase class, there is the property *folder_id*,
> which will have an auto generated getter *getFolderId*, or apparently (in
> a surprise to me) *getFolder_id*. The first letter of the property is
> capitalized in the getter, as is each letter following an underscore.
>
> On Thu, Jul 5, 2012 at 6:27 PM, Mona Wong <mona at sdsc.edu> wrote:
>
>>
>> Never mind, I found it, $folder[0]->getFolder_id() (:
>>
>> Mona
>>
>>
>> Begin forwarded message:
>>
>> >> The dao classes have auto-generated getter methods for each of their
>> data properties. So to get the item id, you would call:
>> >>
>> >> $itemId = $item->getItemId();
>> >>
>> >> Items are actually allowed to be simultaneously in multiple folders
>> (although that is uncommon), and the way to get all of the parent folders
>> of an item is to call:
>> >>
>> >> $folders = $item->getFolders();
>> >>
>> >> It will return a list of folder daos representing all of the folders
>> in which the item resides.
>> >
>> > Excuse my ignorance but how do I get the folder_id from the
>> $folders? I tried accessing $folders[0]->Folderid() and
>> $folders[0]->FolderID() but they did not work and I couldn't find where the
>> AppDao (superclass of FolderDao) is defined.
>> >
>> > thanks,
>> > Mona
>>
>> *********************************************
>> Mona Wong
>> Web & iPad Application Developer
>> San Diego Supercomputer Center
>>
>> You are the light you wish to see.
>> *********************************************
>>
>>
>>
>> _______________________________________________
>> Midas mailing list
>> Midas at public.kitware.com
>> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>>
>
>
>
> --
> Thanks,
> Michael Grauer
> R & D Engineer
> Kitware, Inc.
> 919 969 6990 x322
>
>
>
>
> _______________________________________________
> Midas mailing list
> Midas at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>
>
--
Zach Mullen
R & D Engineer
Kitware Inc.
919-869-8858
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120705/ba6d32f6/attachment.html>
More information about the Midas
mailing list