Hi list, I am not very fund of php and have a question regarding its handling of objects. With Propel I can fetch objects form the database, which is great. If I do for example "ObjectPeer::doSelect(new Criteria())" I get back an array of my objects. Now, how do I work with this array 'wisely'??
I know I can do a foreach to go through the array, which is great too. I also found out I can identify an object in the array with "in_array($obj, $objects)", also very great. But: How do I add a or more objects to the array, say by fetching some more from db? Can I delete one object from the array? Can I get a certain object from the array, say like $objects->get($obj)? Can I work with position of objects in the array, say like $pos = $objects->posOf($obj); $objects->get($pos);? If I fetch an object by joining another one can I still do "in_array($obj, $fetched_objects)" with $obj beeing an object without the joined ones (I am not sure this makes any sense, which leads me to my next question:)? How are joined objects stored in a array? As an object? Or as an array of objects, like $obj->$joinedObj->Array()? Can I than do "in_array($joinedObj, $objects) and find it? That wouldnt make sense, because what really should be found is $obj->$joinedObj??? I really would appreciate it very much if some could enlighten or point me in the right direction about the object principle in php and propel? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---