public class PageManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected LruCache<Path,java.lang.ref.SoftReference<QuercusProgram>> |
_programCache |
protected static L10N |
L |
Constructor and Description |
---|
PageManager(QuercusContext quercus)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearProgram(Path path,
QuercusProgram program) |
void |
close() |
protected QuercusPage |
compilePage(QuercusProgram program,
Path path) |
int |
getPageCacheSize()
Gets the max size of the page cache.
|
Path |
getPwd()
Gets the owning directory.
|
QuercusContext |
getQuercus() |
boolean |
isActive()
true if the manager is active.
|
boolean |
isCompile()
true if the pages should be compiled.
|
boolean |
isCompileFailover()
true if interpreted pages should be used if pages fail to compile.
|
boolean |
isLazyCompile()
true if the pages should be compiled lazily.
|
boolean |
isRequireSource()
true if compiled pages require their source
|
QuercusPage |
parse(Path path)
Returns a parsed or compiled quercus program.
|
QuercusPage |
parse(Path path,
java.lang.String fileName,
int line)
Returns a parsed or compiled quercus program.
|
QuercusPage |
parseImpl(Path path,
java.lang.String fileName,
int line) |
boolean |
precompileExists(Path path) |
protected QuercusProgram |
preloadProgram(Path path,
java.lang.String fileName) |
void |
setCompile(boolean isCompile)
true if the pages should be compiled.
|
void |
setCompileFailover(boolean isCompileFailover)
true if interpreted pages should be used if pages fail to compile.
|
void |
setLazyCompile(boolean isCompile)
true if the pages should be compiled.
|
void |
setPageCacheSize(int size)
Sets the max size of the page cache.
|
void |
setRequireSource(boolean isRequireSource)
true if compiled pages require their source
|
protected static final L10N L
protected LruCache<Path,java.lang.ref.SoftReference<QuercusProgram>> _programCache
public PageManager(QuercusContext quercus)
public QuercusContext getQuercus()
public Path getPwd()
public boolean isCompile()
public void setCompile(boolean isCompile)
public boolean isLazyCompile()
public void setLazyCompile(boolean isCompile)
public boolean isCompileFailover()
public void setCompileFailover(boolean isCompileFailover)
public void setRequireSource(boolean isRequireSource)
public boolean isRequireSource()
public int getPageCacheSize()
public void setPageCacheSize(int size)
public boolean isActive()
public QuercusPage parse(Path path) throws java.io.IOException
path
- the source file pathjava.io.IOException
public QuercusPage parse(Path path, java.lang.String fileName, int line) throws java.io.IOException
path
- the source file pathjava.io.IOException
public QuercusPage parseImpl(Path path, java.lang.String fileName, int line) throws java.io.IOException
java.io.IOException
public boolean precompileExists(Path path)
protected QuercusProgram preloadProgram(Path path, java.lang.String fileName)
protected void clearProgram(Path path, QuercusProgram program)
protected QuercusPage compilePage(QuercusProgram program, Path path)
public void close()