ZMPhpPackagePacker
public class ZMPhpPackagePacker
| Field Summary | |
|---|---|
| protected mixed | |
| protected mixed | |
| protected mixed | |
| protected mixed | |
| Constructor Summary | |
|---|---|
ZMPhpPackagePacker(string root, string out, string temp) Create new instance. |
|
| Method Summary | |
|---|---|
| void | clean() Clean up temp stuff. |
| protected void | compressFiles(boolean strip) Compress all prepared files. |
| boolean | dropInclude(string line) Decide whether a drop an include/require line or not. |
| array | finalizeDependencies(array dependencies, array files) Finalise dependencies. |
| protected array | getClassInfo(string source) Get class info. |
| boolean | ignoreFile(string file) Decide whether a ignore a file completely or not. |
| boolean | isResolved(string class, int level, array files) Decide whether a class dependencies are resolved or not. |
| void | packFiles(boolean strip) Pack all. |
| protected void | Prepare the original files to be processed by ZMPhpCompressor. |
| void | setDebug(boolean debug) Set the debug flag. |
| void | setTemp(string temp) Set the temp folder. |
protected mixed $outputFilename
protected mixed $rootFolder
protected mixed $tempFolder
protected mixed $treeMap
public ZMPhpPackagePacker(string root, string out, string temp)
Create new instance.
null.public void clean()
Clean up temp stuff.
protected void compressFiles(boolean strip)
Compress all prepared files.
true, stript the files while compressing; default is true.public boolean dropInclude(string line)
Decide whether a drop an include/require line or not.
true, if the include/require should be dropped.public array finalizeDependencies(array dependencies, array files)
Finalise dependencies.
Callback to manipulate the computed dependencies.
ZMLoader::findIncludes().protected array getClassInfo(string source)
Get class info.
public boolean ignoreFile(string file)
Decide whether a ignore a file completely or not.
Callback to allow custom handling, for example exclusion of files or folders.
true, if the file should be ignored.public boolean isResolved(string class, int level, array files)
Decide whether a class dependencies are resolved or not.
Callback to allow custom handling, for example in case of circular references.
ZMLoader::findIncludes().true, if the class should be considered cleared of all dependencies.public void packFiles(boolean strip)
Pack all.
true, stript the files while compressing; default is true.protected void prepareFiles()
Prepare the original files to be processed by ZMPhpCompressor.
public void setDebug(boolean debug)
Set the debug flag.
public void setTemp(string temp)
Set the temp folder.
null.
Analyze dependencies of a given PHP package (folder tree), resolve and compress.
This class is build on top of
ZMPhpCompressor. It adds the ability to resolve include and require directives. It also takes care of missing PHP close tags ?>.