|
From: <php...@li...> - 2010-05-30 18:33:44
|
Btw to avoid confusion: The engine key PhpProcedure is the environment that
has been passed to the java continuation via java_context()->call(ENV) --
continuations are modeled as procedures, that's why it's called
"PhpProcedure"
On May 30, 2010 8:18 PM, "Jost Boekemeier" <jos...@go...>
wrote:
Hi,
you are calling procedures from the servlet package outside of a servlet
environment. I am surprised that this works at all.
Outside of a servlet env use:
import java.io.Closeable;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class TestX {
public static void main(String s[]) throws Exception {
ScriptEngine e = new ScriptEngineManager().getEngineByName("php-invocable");
e.eval("<?php class X { public function f() {return 'hello';} }
java_context()->call(java_closure(new X())); ?>");
System.out.println(((Invocable)e).invokeMethod(e.get("php.java.bridge.PhpProcedure"),
"f", new Obje...
> > On May 30, 2010 1:22 PM, <php...@li...>
wrote: > > > Trying to c...
|