com.caucho.quercus.page
Class QuercusPage

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

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.
 Path getPwd(Env env)
          Returns the pwd according to the source page.
abstract  Path getSelfPath(Env env)
          Returns the page's path.
 void importDefinitions(Env env)
          Imports the page definitions.
 void init(Env env)
          Initialize the environment
 void init(Quercus quercus)
          Initialize the program
 boolean isModified(Env env)
          Returns true if the page is modified.
 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(Env env)
Returns true if the page is modified.


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(Quercus 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.


toString

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