public class QuercusProgram
extends java.lang.Object
Constructor and Description |
---|
QuercusProgram(QuercusContext quercus,
Path sourceFile,
java.util.HashMap<StringValue,Function> functionMap,
java.util.ArrayList<Function> functionList,
java.util.HashMap<java.lang.String,InterpretedClassDef> classMap,
java.util.ArrayList<InterpretedClassDef> classList,
FunctionInfo functionInfo,
Statement statement)
Creates a new quercus program
|
QuercusProgram(QuercusContext quercus,
Path sourceFile,
QuercusPage page)
Creates a new quercus program
|
Modifier and Type | Method and Description |
---|---|
void |
addDepend(Path path)
Adds a dependency.
|
QuercusProgram |
createExprReturn()
Creates a return for the final expr.
|
Value |
execute(Env env)
Execute the program
|
AbstractFunction |
findFunction(StringValue name)
Finds a function.
|
void |
finishCompiling()
Notifies waiting listeners that compilation has finished.
|
java.util.Collection<InterpretedClassDef> |
getClasses()
Returns the classes.
|
java.util.ArrayList<InterpretedClassDef> |
getClassList()
Returns the functions.
|
QuercusPage |
getCompiledPage()
Returns the compiled page.
|
java.lang.Throwable |
getCompileException() |
java.util.ArrayList<PersistentDependency> |
getDependencyList() |
FunctionInfo |
getFunctionInfo() |
java.util.ArrayList<Function> |
getFunctionList()
Returns the functions.
|
java.util.Collection<Function> |
getFunctions()
Returns the functions.
|
QuercusContext |
getPhp()
Returns the engine.
|
QuercusPage |
getProfilePage()
Returns the profiling page.
|
AbstractFunction[] |
getRuntimeFunctionList() |
Path |
getSourcePath()
Returns the source path.
|
Statement |
getStatement() |
void |
importDefinitions(Env env)
Imports the page definitions.
|
void |
init(Env env)
Imports the page definitions.
|
boolean |
isCompilable()
Returns true if the page can be compiled or it is unknown.
|
boolean |
isCompiling()
Returns true if this page is being compiled.
|
boolean |
isModified()
Returns true if the function is modified.
|
void |
setCompilable(boolean isCompilable)
Set to false if page cannot be compiled.
|
void |
setCompiledPage(QuercusPage page)
Sets the compiled page.
|
void |
setCompileException(java.lang.Throwable e) |
void |
setProfilePage(QuercusPage page)
Sets the profiling page.
|
boolean |
setRuntimeFunction(AbstractFunction[] funList)
Sets a runtime function array after an env.
|
boolean |
startCompiling()
Start compiling
|
java.lang.String |
toString() |
void |
waitForCompile()
Set to true if this page is being compiled.
|
void |
waitForRuntimeFunctionList(long timeout) |
public QuercusProgram(QuercusContext quercus, Path sourceFile, java.util.HashMap<StringValue,Function> functionMap, java.util.ArrayList<Function> functionList, java.util.HashMap<java.lang.String,InterpretedClassDef> classMap, java.util.ArrayList<InterpretedClassDef> classList, FunctionInfo functionInfo, Statement statement)
quercus
- the owning quercus enginesourceFile
- the path to the source filestatement
- the top-level statementpublic QuercusProgram(QuercusContext quercus, Path sourceFile, QuercusPage page)
quercus
- the owning quercus enginesourceFile
- the path to the source filestatement
- the top-level statementpublic QuercusContext getPhp()
public Path getSourcePath()
public FunctionInfo getFunctionInfo()
public Statement getStatement()
public boolean startCompiling()
public void finishCompiling()
public void waitForCompile()
public boolean isCompiling()
public void setCompilable(boolean isCompilable)
public boolean isCompilable()
public void setCompileException(java.lang.Throwable e)
public java.lang.Throwable getCompileException()
public void addDepend(Path path)
public java.util.ArrayList<PersistentDependency> getDependencyList()
public boolean isModified()
public QuercusPage getCompiledPage()
public void setCompiledPage(QuercusPage page)
public QuercusPage getProfilePage()
public void setProfilePage(QuercusPage page)
public AbstractFunction findFunction(StringValue name)
public java.util.Collection<Function> getFunctions()
public java.util.ArrayList<Function> getFunctionList()
public java.util.Collection<InterpretedClassDef> getClasses()
public java.util.ArrayList<InterpretedClassDef> getClassList()
public QuercusProgram createExprReturn()
public Value execute(Env env)
env
- the calling environmentpublic void init(Env env)
public boolean setRuntimeFunction(AbstractFunction[] funList)
public AbstractFunction[] getRuntimeFunctionList()
public void waitForRuntimeFunctionList(long timeout)
public void importDefinitions(Env env)
public java.lang.String toString()
toString
in class java.lang.Object