Hello, I am using php 4.2.3 with the jdk1.3.1_04 running on RedHat 7.2 and apache 1.3.22. The terms "Factory" and "Proxy" are similar to their respective design patterns. I have a java Factory that creates Proxy objects. The Factory returns a base interface that can be cast as the class that was actually instantiated.
The problem is that after I call the Factory method simpleCreateObject() from php I need to cast the variable returned as a derived class from within php. In java I would just cast the return value as whatever class I requested like so: // java code to cast return type as derived class per = (GenericProxy)tcpb.simpleCreateObject("Person", 0, null); // php code used to call simpleCreateObject() $per = $tcpb->simpleCreateObject('Person', 1, null); How can I cast $per as a different class? Thank you, Gardner -- Gardner Lloyd Bickford III TriAxial Data Systems 36 Brennan Street Watsonville, CA 95076 Phone: (831) 763-3697 x101 Fax: (831) 763-3699 Please note that the views expressed in this message are the views of the author alone and not necessarily the views of TriAxial Data Systems -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php