From: Abbett, J. <Jon...@ch...> - 2005-08-10 15:45:52
|
A method I use returns a "List" of objects. I, with my developer's omniscience, know that each object in the list is of a particular class. How do I cast my object to that class? The Java code I'm basing this on simply looks like: List fooList =3D getFooList(); MyClass foo =3D (MyClass)fooList.get(0); I'm stumped as to write the PHP analog. Thanks, Jon =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jonathan Abbett Children's Hospital Informatics Program 1 Autumn Street, Fifth Floor Boston, MA 02215 617-355-8334 http://www.chip.org |