|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.script.AbstractScriptEngine
php.java.script.InvocablePhpScriptEngine
php.java.script.InteractivePhpScriptEngine
public class InteractivePhpScriptEngine
A convenience variant of the PHP script engine which can be used interactively.
Example:
ScriptEngine e = (new ScriptEngineManager()).getEngineByName("php-interactive);
e.eval("$v = 1+2");
System.out.println(e.eval("echo $v"));
e.eval((String)null);
| Field Summary |
|---|
| Fields inherited from interface javax.script.ScriptEngine |
|---|
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME |
| Constructor Summary | |
|---|---|
InteractivePhpScriptEngine(InteractivePhpScriptEngineFactory factory)
Create the interactive php script engine. |
|
| Method Summary | |
|---|---|
Bindings |
createBindings()
Retrieves an uninitailized namespace which can be used as the scope of the ScriptEngine. |
java.lang.Object |
eval(java.io.Reader reader,
ScriptContext context)
Evaluates a script obtained using the specified reader as the script source and using the namespaces in the specifed ScriptContext. |
java.lang.Object |
eval(java.lang.String script,
ScriptContext context)
Create the interactive php script engine. |
ScriptEngineFactory |
getFactory()
Retrieves a ScriptEngineFactory for the class to which describes the underlying ScriptEngine. |
void |
release()
Release the continuation |
| Methods inherited from class php.java.script.InvocablePhpScriptEngine |
|---|
getInterface, getInterface, invoke, invoke, invokeFunction, invokeMethod |
| Methods inherited from class javax.script.AbstractScriptEngine |
|---|
eval, eval, eval, eval, get, getBindings, getContext, put, setBindings, setContext |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InteractivePhpScriptEngine(InteractivePhpScriptEngineFactory factory)
| Method Detail |
|---|
public java.lang.Object eval(java.lang.String script,
ScriptContext context)
throws ScriptException
eval in interface ScriptEnginescript - the String representation of the scriptcontext - tbe ScriptContext containing namespaces for the
script evaluation
ScriptException - if an error occurspublic void release()
release in class InvocablePhpScriptEngine
public java.lang.Object eval(java.io.Reader reader,
ScriptContext context)
throws ScriptException
ScriptEngine
reader - the script sourcecontext - the context contianing different namespace for
script evaluation
ScriptException - if an error occurspublic ScriptEngineFactory getFactory()
ScriptEngine
public Bindings createBindings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||