| 
 | ||||||||||
| 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() | |
| InteractivePhpScriptEngine(Bindings n)Create a new ScriptEngine with bindings. | |
| InteractivePhpScriptEngine(InteractivePhpScriptEngineFactory factory)Create the interactive php script engine. | |
| Method Summary | |
|---|---|
|  boolean | accept(java.io.File outputFile) | 
|  java.lang.Object | clone() | 
|  void | close()Release the script engine. | 
|  CompiledScript | compile(java.io.Reader reader)Retrieves a CompileScript implementation for the script obtained using java.io.Reader as the script source. | 
|  CompiledScript | compile(java.lang.String script)Retrieves a CompileScript implementation for the given piece of script which is a abstraction for the intermediate code produced by the compilation. | 
|  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)Evaluate a PHP line. | 
|  ScriptContext | getContext()Return the script context. | 
|  ScriptEngineFactory | getFactory()Retrieves a ScriptEngineFactory for the class to which describes the underlying ScriptEngine. | 
|  void | release()Release the continuation | 
|  void | setContext(ScriptContext context)Set a new context. | 
| Methods inherited from class php.java.script.InvocablePhpScriptEngine | 
|---|
| getInterface, getInterface, invokeFunction, invokeMethod | 
| Methods inherited from class javax.script.AbstractScriptEngine | 
|---|
| eval, eval, eval, eval, get, getBindings, put, setBindings | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface javax.script.ScriptEngine | 
|---|
| eval, eval, eval, eval, get, getBindings, put, setBindings | 
| Constructor Detail | 
|---|
public InteractivePhpScriptEngine()
public InteractivePhpScriptEngine(InteractivePhpScriptEngineFactory factory)
factory - The engine factorypublic InteractivePhpScriptEngine(Bindings n)
n - the bindings| Method Detail | 
|---|
public java.lang.Object eval(java.lang.String script,
                             ScriptContext context)
                      throws ScriptException
eval in interface ScriptEnginescript - The script linecontext - The context
ScriptExceptionpublic void release()
release in interface IPhpScriptEnginerelease in class InvocablePhpScriptEngine
public java.lang.Object eval(java.io.Reader reader,
                             ScriptContext context)
                      throws ScriptException
ScriptEngine
eval in interface ScriptEnginereader - the script sourcecontext - the context contianing different namespace for
                script evaluation
ScriptException - if an error occurspublic ScriptEngineFactory getFactory()
ScriptEngine
getFactory in interface ScriptEnginepublic Bindings createBindings()
createBindings in interface ScriptEngine
public void close()
           throws java.io.IOException
close in interface IPhpScriptEnginejava.io.IOException
public CompiledScript compile(java.lang.String script)
                       throws ScriptException
compile in interface Compilablescript - the source of the script represented as String
ScriptException - if the compilation fials due to any 
         reason
public CompiledScript compile(java.io.Reader reader)
                       throws ScriptException
compile in interface Compilablereader - the reader form which the script source is 
        obtained
ScriptException - if the compilation fials due to any 
         reasonpublic ScriptContext getContext()
getContext in interface ScriptEnginegetContext in class AbstractScriptEnginepublic void setContext(ScriptContext context)
setContext in interface ScriptEnginesetContext in class AbstractScriptEnginecontext - The contextpublic boolean accept(java.io.File outputFile)
accept in interface java.io.FileFilterpublic java.lang.Object clone()
clone in interface java.security.cert.CertStoreParametersclone in class java.lang.Object| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||