ZMPhpPackagePacker
public class ZMPhpPackagePacker
| Field Summary | |
|---|---|
| protected mixed | |
| protected mixed | |
| protected mixed | |
| protected mixed | |
| Method Summary | |
|---|---|
| void | __construct(string root, string out, string temp) Create new instance. |
| void | clean() Clean up temp stuff. |
| protected void | compressFiles(boolean stripCode, boolean stripRef) Compress all prepared files. |
| boolean | dropInclude(string line) Decide whether a drop an include/require line or not. |
| protected array | Get a list of all files to process. |
| array | Get a list of class/interface names to be assumed resolved. |
| boolean | ignoreFile(mixed filename, string file) Decide whether a ignore a file completely or not. |
| void | packFiles(boolean strip, boolean stripRef) Pack all. |
| array | patchFile(string filename, mixed lines) Allow custom file patching. |
| protected void | Prepare the original files to be processed by ZMPhpCompressor. |
| void | setDebug(boolean debug) Set the debug flag. |
| void | setResolveInheritance(boolean resolveInheritance) Set the resolveInheritance flag. |
| void | setTemp(string temp) Set the temp folder. |
protected mixed $outputFilename_
protected mixed $rootFolder_ = true
protected mixed $tempFolder_
protected mixed $treeMap_
public void __construct(string root, string out, string temp)
Create new instance.
null.null.null.public void clean()
Clean up temp stuff.
protected void compressFiles(boolean stripCode, boolean stripRef)
Compress all prepared files.
true, strip the files while compressing.true, strip code that uses references.public boolean dropInclude(string line)
Decide whether a drop an include/require line or not.
true, if the include/require should be dropped.protected array getFileList()
Get a list of all files to process.
public array getPreResolved()
Get a list of class/interface names to be assumed resolved.
The default implementation will return a list of predefined PHP standard and SPL exceptions and interfaces.
public boolean ignoreFile(mixed filename, 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 void packFiles(boolean strip, boolean stripRef)
Pack all.
true, stript the files while compressing.true, strip code that uses references.public array patchFile(string filename, mixed lines)
Allow custom file patching.
null.protected void prepareFiles()
Prepare the original files to be processed by ZMPhpCompressor.
public void setDebug(boolean debug)
Set the debug flag.
public void setResolveInheritance(boolean resolveInheritance)
Set the resolveInheritance flag.
Default is false - that should be enough for PEAR compatible packages.
true try to resolve inheritance as determined by analysing the PHP source.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 ?>.