com.caucho.quercus.page
Class QuercusPage

java.lang.Object
  extended by com.caucho.quercus.page.QuercusPage
Direct Known Subclasses:
InterpretedPage, ProfilePage

public abstract class QuercusPage
extends java.lang.Object

Represents a compiled PHP program.


Constructor Summary
QuercusPage()
           
 
Method Summary
protected  void addClass(java.lang.String name, ClassDef cl)
          Adds a class.
protected  void addFunction(java.lang.String name, AbstractFunction fun)
          Adds a function.
abstract  Value execute(Env env)
          Execute the program
 Value executeTop(Env env)
          Execute the program as top-level, i.e.
 ClassDef findClass(java.lang.String name)
          Finds a function.
 AbstractFunction findFunction(java.lang.String name)
          Finds a function.
 java.util.HashMap<java.lang.String,ClassDef> getClassMap()
          Returns the class map.
 QuercusPage getCompiledPage()
          Returns the compiling page, if any
 QuercusPage getProfilePage()
          Returns the profiling page, if any
 Path getPwd(Env env)
          Returns the pwd according to the source page.
abstract  Path getSelfPath(Env env)
          Returns the page's path.
 java.lang.String getUserPath()
          Returns the user name for profiling, if any
 void importDefinitions(Env env)
          Imports the page definitions.
 void init(Env env)
          Initialize the environment
 void init(QuercusContext quercus)
          Initialize the program
 boolean isModified()
          Returns true if the page is modified.
 void setProfilePage(QuercusPage profilePage)
          Sets the profiling page, if any
 boolean setRuntimeFunction(AbstractFunction[] funList)
          Sets a runtime function array after an env.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuercusPage

public QuercusPage()
Method Detail

isModified

public boolean isModified()
Returns true if the page is modified.


getCompiledPage

public QuercusPage getCompiledPage()
Returns the compiling page, if any


getUserPath

public java.lang.String getUserPath()
Returns the user name for profiling, if any


getProfilePage

public QuercusPage getProfilePage()
Returns the profiling page, if any


setProfilePage

public void setProfilePage(QuercusPage profilePage)
Sets the profiling page, if any


getSelfPath

public abstract Path getSelfPath(Env env)
Returns the page's path.


findFunction

public AbstractFunction findFunction(java.lang.String name)
Finds a function.


findClass

public ClassDef findClass(java.lang.String name)
Finds a function.


getClassMap

public java.util.HashMap<java.lang.String,ClassDef> getClassMap()
Returns the class map.


executeTop

public Value executeTop(Env env)
Execute the program as top-level, i.e. not included.

Parameters:
env - the calling environment

getPwd

public Path getPwd(Env env)
Returns the pwd according to the source page.


execute

public abstract Value execute(Env env)
Execute the program

Parameters:
env - the calling environment

init

public void init(QuercusContext quercus)
Initialize the program

Parameters:
quercus - the owning engine

init

public void init(Env env)
Initialize the environment

Parameters:
quercus - the owning engine

importDefinitions

public void importDefinitions(Env env)
Imports the page definitions.


addFunction

protected void addFunction(java.lang.String name,
                           AbstractFunction fun)
Adds a function.


addClass

protected void addClass(java.lang.String name,
                        ClassDef cl)
Adds a class.


setRuntimeFunction

public boolean setRuntimeFunction(AbstractFunction[] funList)
Sets a runtime function array after an env.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object