1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161:
<?php
include_once(__DIR__.'/Phar/ResultCompleter.php');
class Packager_Phar extends Packager_Phar_ResultCompleter
{
/**
* Create singleton instance with configuration
*
* @param array $cfg
*
* @return Packager_Phar
*/
public static function Create ($cfg = array()) {
return parent::Create($cfg);
}
/**
* Get instance and merge configuration or create singleton instance with configuration
*
* @param array $cfg
*
* @return Packager_Phar
*/
public static function Get ($cfg = array()) {
return parent::Get($cfg);
}
/**
* Set application sources directory
*
* @param string $fullOrRelativePath
*
* @return Packager_Phar
*/
public function SetSourceDir ($fullOrRelativePath = '') {
return parent::SetSourceDir($fullOrRelativePath);
}
/**
* Set compilation result file, if exist, it will be overwriten
*
* @param string $releaseFileFullPath
*
* @return Packager_Phar
*/
public function SetReleaseFile ($releaseFileFullPath = '') {
return parent::SetReleaseFile($releaseFileFullPath);
}
/**
* Set preg_replace() patterns array or single string about
* which files or folders will be excluded from result file.
* Function replace all previous configuration records.
*
* @param array|string $excludePatterns
*
* @return Packager_Phar
*/
public function SetExcludePatterns ($excludePatterns = array()) {
return parent::SetExcludePatterns($excludePatterns);
}
/**
* Add preg_replace() patterns array or single string about
* which files or folders will be excluded from result file.
*
* @param array|string $excludePatterns
*
* @return Packager_Phar
*/
public function AddExcludePatterns ($excludePatterns = array()) {
return parent::AddExcludePatterns($excludePatterns);
}
/**
* Set patterns/replacements array about what will be replaced
* in *.php and *.phtml files by preg_replace(pattern, replacement, source)
* before possible minification process.
* Function replace all previous configuration records.
*
* @param array $patternReplacements
*
* @return Packager_Php
*/
public function SetPatternReplacements ($patternReplacements = array()) {
return parent::SetPatternReplacements($patternReplacements);
}
/**
* Add patterns/replacements array about what will be replaced
* in *.php and *.phtml files by preg_replace(pattern, replacement, source)
* before possible minification process.
*
* @param array $patternReplacements
*
* @return Packager_Php
*/
public function AddPatternReplacements ($patternReplacements = array()) {
return parent::AddPatternReplacements($patternReplacements);
}
/**
* Set str_replace() key/value array about
* what will be simply replaced in result file.
* Function replace all previous configuration records.
*
* @param array $stringReplacements
*
* @return Packager_Phar
*/
public function SetStringReplacements ($stringReplacements = array()) {
return parent::SetStringReplacements($stringReplacements);
}
/**
* Add str_replace() key/value array about
* what will be simply replaced in result file.
*
* @param array $stringReplacements
*
* @return Packager_Phar
*/
public function AddStringReplacements ($stringReplacements = array()) {
return parent::AddStringReplacements($stringReplacements);
}
/**
* Set boolean if *.phtml templates will be minimized before saving into result file
*
* @param string $minifyTemplates
*
* @return Packager_Phar
*/
public function SetMinifyTemplates ($minifyTemplates = TRUE) {
return parent::SetMinifyTemplates($minifyTemplates);
}
/**
* Set boolean if *.php scripts will be minimized before saving into result file
*
* @param string $minifyPhp
*
* @return Packager_Phar
*/
public function SetMinifyPhp ($minifyPhp = TRUE) {
return parent::SetMinifyPhp($minifyPhp);
}
/**
* Merge multilevel configuration array with previously initialized values.
* New values sended into this function will be used preferred.
*
* @param array $cfg
*
* @return Packager_Phar
*/
public function MergeConfiguration ($cfg = array()) {
return parent::MergeConfiguration($cfg);
}
/**
* Run PHAR compilation process, print output to CLI or browser
*
* @param array $cfg
*
* @return Packager_Phar
*/
public function Run ($cfg = array()) {
parent::Run($cfg);
list($jobMethod, $params) = $this->completeJobAndParams();
$this->$jobMethod($params);
}
}