|
From: <php...@li...> - 2007-07-24 15:59:27
|
hi to all.
first of all, i'm sorry for my bad english.. i hope you will understand me.
I was doing an experiment with php classes and java interfaces.
i have a java class:
public class ObjPassing
{
public void visit( Object o)
{ System.out.println("first visit method"); }
public void visit( IVisit o) // <-- i wish to run this one
{ System.out.println("second visit method"); }
}
I need to pass a php object(Obj is it's name) who implements my IVisit
java interface, to ObjPassing, but i never manage to invoke the second
method: the first method is always invoked.
from php i do:
$obj = new Java('ObjPassing');
$obj->visit(java_get_closure(new Obj(),null, new JavaClass("IVisit")));
is it possible to call the second method? if yes, where is my fault?
thank you
|