Anyways
I have a series of objects stored in an array:
Code: Select all
$my_array[0] = new MyObject1();
$my_array[1] = new MyObject2();
$my_array[2] = new MyObject1();
$my_array[3] = new MyObject3();Using the following I have called one of the objects member functions:
Code: Select all
$ref =& $my_array[1];
$ref->doSomething();For instance the above example, MyObject2 at index: 1 would need to somehow determine, using doSomething() that it was located at index: 1
Remember: I cannot pass any of these objects the index or anything that would indicate the position at which they reside...
Ideas???