Class Packager_Php
- Packager_Common_Base
-
Packager_Php_Base
-
Packager_Php_Scripts_Completer
-
Packager_Php_Scripts_Order
-
Packager_Php_Scripts_Dependencies
-
Packager_Php_Completer
-
Packager_Php
public static
|
|
public static
|
|
public
|
|
public
|
#
SetReleaseFile( string $releaseFileFullPath = '' )
Set compilation result file, if exist, it will be overwriten |
public
|
#
SetExcludePatterns( array|string $excludePatterns = array() )
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. |
public
|
#
AddExcludePatterns( array|string $excludePatterns = array() )
Add preg_replace() patterns array or single string about which files or folders will be excluded from result file. |
public
|
#
SetPatternReplacements( array $patternReplacements = array() )
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. |
public
|
#
AddPatternReplacements( array $patternReplacements = array() )
Add patterns/replacements array about what will be replaced in *.php and *.phtml files by preg_replace(pattern, replacement, source) before possible minification process. |
public
|
#
SetStringReplacements( array $stringReplacements = array() )
Set str_replace() key/value array about what will be simply replaced in result file. Function replace all previous configuration records. |
public
|
#
AddStringReplacements( array $stringReplacements = array() )
Add str_replace() key/value array about what will be simply replaced in result file. |
public
|
#
SetIncludeFirst( array|string $includeFirst = array() )
Set list of relative PHP file path(s) from application document root to include in result file as first, after everything will be included by automatic order determination. List will be prepended or appended before or after existing list by second param Function replace all previous configuration records. |
public
|
#
AddIncludeFirst( array|string $includeFirst = array(), string $mode = 'append' )
Add list of relative PHP file path(s) from application document root to include in result file as first, after everything will be included by automatic order determination. List will be prepended or appended before or after existing list by second param. |
public
|
#
SetIncludeLast( array|string $includeLast = array() )
Set list of relative PHP file path(s) from application document root to include in result file as last, after everything will be included by automatic order determination. List will be prepended or appended before or after existing list by second param Function replace all previous configuration records. |
public
|
#
AddIncludeLast( array|string $includeLast = array(), string $mode = 'append' )
Add list of relative PHP file path(s) from application document root to include in result file as last, after everything will be included by automatic order determination. List will be prepended or appended before or after existing list by second param. By default, there is initialized by default "index.php" file to include as last, see Packager_Php::SetIncludeLastDefault() to overwrite it or use (new Packager_Php)->SetIncludeLast() to overwrite it. |
public
|
#
SetMinifyTemplates( string $minifyTemplates = TRUE )
Set boolean if *.phtml templates will be minimized before saving into result file |
public
|
#
SetMinifyPhp( string $minifyPhp = TRUE )
Set boolean if *.php scripts will be minimized before saving into result file |
public
|
#
SetPhpFileSystemMode( string $fsMode = self::FS_MODE_PRESERVE_HDD )
Set mode for wrapper class how to behave when any replaced file system php function will be called - it here will be searching in memory and after in hdd or hdd first and then memory or no memory or no hdd. |
public
|
#
SetAutoloadingOrderDetection( boolean $enabled = TRUE )
Enable or disable PHP files order detection by autoloader(s), by MvcCore startup.php autoloader or by startup.php and composer autoloader. |
public
|
#
ReplacePhpFunctions( )
Define all php functions you want to replace with internal php file calls as strings, named functions will not be used in original way to read/write anything from hard drive, all specified functions will be replaced with wrapper calls to give results from memory variables. It's possible to name 'include' and 'require', but all 'include_once' and 'require_once' are replaced automaticly if there is safely detected line content - string only, no variables inside |
public
|
#
KeepPhpFunctions( string $phpFuncStr,… )
Define all php functions you don't want to replace with internal php file calls as strings, named functions will be used in original way to read/write anything from hard drive. It's possible to name 'include' and 'require', but all 'include_once' and 'require_once' are replaced automaticly if there is safely detected line content - string only, no variables inside |
public
|
#
MergeConfiguration( array $cfg = array() )
Merge multilevel configuration array with previously initialized values. New values sended into this function will be used as preferred. |
public
|
|
public
|
#
PrintFilesToPack( array $cfg = array() )
Print all files included by exclude/include pattern rules directly to output |
autoloadJob(),
mainJob(),
notify()
|
AutoloadCall(),
CompleteIncludedFilesByTargetFile(),
completePhpFilesDependencies(),
completePhpFilesDependenciesByAutoloadDeclaration()
|
completePhpFilesOrder()
|
completeWrapperCode(),
processPatternAndStringReplacements(),
processPhpCode()
|
SetExcludePatternsDefault(),
SetIncludeFirstDefault(),
SetIncludeLastDefault(),
__construct()
|
string |
FS_MODE_PRESERVE_HDD
|
#
'PHP_PRESERVE_HDD'
|
string |
FS_MODE_PRESERVE_PACKAGE
|
#
'PHP_PRESERVE_PACKAGE'
|
string |
FS_MODE_STRICT_HDD
|
#
'PHP_STRICT_HDD'
|
string |
FS_MODE_STRICT_PACKAGE
|
#
'PHP_STRICT_PACKAGE'
|
NAMESPACE_GLOBAL_CURLY_BRACKETS,
NAMESPACE_NAMED_CURLY_BRACKETS,
NAMESPACE_NAMED_SEMICOLONS,
NAMESPACE_NONE
|