Overview

Classes

  • Packager_Common_Base
  • Packager_Common_StaticCopies
  • Packager_Phar
  • Packager_Phar_ResultCompleter
  • Packager_Php
  • Packager_Php_Base
  • Packager_Php_Completer
  • Packager_Php_Scripts_Completer
  • Packager_Php_Scripts_Dependencies
  • Packager_Php_Scripts_Order
  • Packager_Php_Scripts_Replacer
  • Packager_Php_Wrapper
  • Packager_Php_Wrapper_DirectoryIterator
  • Packager_Php_Wrapper_SplFileInfo

Exceptions

  • Packager_Php_Scripts_Throwable
  • Overview
  • Class
  • Tree
  • Todo
  • Deprecated
  • Download

Class Packager_Phar

Packager_Common_Base
Extended by Packager_Common_StaticCopies
Extended by Packager_Phar_ResultCompleter
Extended by Packager_Phar
Located at src/Packager/Phar.php
Methods summary
public static Packager_Phar
# Create( array $cfg = [] )

Create singleton instance with configuration

Create singleton instance with configuration

Parameters

$cfg

Returns

Packager_Phar

Overrides

Packager_Common_Base::Create()
public static Packager_Phar
# Get( array $cfg = [] )

Get instance and merge configuration or create singleton instance with configuration

Get instance and merge configuration or create singleton instance with configuration

Parameters

$cfg

Returns

Packager_Phar

Overrides

Packager_Common_Base::Get()
public Packager_Phar
# SetSourceDir( string $fullOrRelativePath = '' )

Set application sources directory

Set application sources directory

Parameters

$fullOrRelativePath

Returns

Packager_Phar

Overrides

Packager_Common_Base::SetSourceDir()
public Packager_Phar
# SetReleaseDir( string $fullOrRelativePath = '' )

Set compilation result(s) directory, all files will be removed first.

Set compilation result(s) directory, all files will be removed first.

Parameters

$fullOrRelativePath

Returns

Packager_Phar

Overrides

Packager_Common_Base::SetReleaseDir()
public Packager_Phar
# SetReleaseFileName( string $releaseFileName = '/index.php' )

Set compilation result PHP script file name, '/index.php` by default.

Set compilation result PHP script file name, '/index.php` by default.

Parameters

$releaseFileName

Returns

Packager_Phar

Overrides

Packager_Common_Base::SetReleaseFileName()
public Packager_Phar
# SetExcludePatterns( array|string $excludePatterns = [] )

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.

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.

Parameters

$excludePatterns

Returns

Packager_Phar

Overrides

Packager_Common_Base::SetExcludePatterns()
public Packager_Phar
# AddExcludePatterns( array|string $excludePatterns = [] )

Add preg_replace() patterns array or single string about which files or folders will be excluded from result file.

Add preg_replace() patterns array or single string about which files or folders will be excluded from result file.

Parameters

$excludePatterns

Returns

Packager_Phar

Overrides

Packager_Common_Base::AddExcludePatterns()
public Packager_Php
# SetPatternReplacements( array $patternReplacements = [] )

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.

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.

Parameters

$patternReplacements

Returns

Packager_Php

Overrides

Packager_Common_Base::SetPatternReplacements()
public Packager_Php
# AddPatternReplacements( array $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.

Add patterns/replacements array about what will be replaced in *.php and *.phtml files by preg_replace(pattern, replacement, source) before possible minification process.

Parameters

$patternReplacements

Returns

Packager_Php

Overrides

Packager_Common_Base::AddPatternReplacements()
public Packager_Phar
# SetStringReplacements( array $stringReplacements = [] )

Set str_replace() key/value array about what will be simply replaced in result file. Function replace all previous configuration records.

Set str_replace() key/value array about what will be simply replaced in result file. Function replace all previous configuration records.

Parameters

$stringReplacements

Returns

Packager_Phar

Overrides

Packager_Common_Base::SetStringReplacements()
public Packager_Phar
# AddStringReplacements( array $stringReplacements = [] )

Add str_replace() key/value array about what will be simply replaced in result file.

Add str_replace() key/value array about what will be simply replaced in result file.

Parameters

$stringReplacements

Returns

Packager_Phar

Overrides

Packager_Common_Base::AddStringReplacements()
public Packager_Phar
# SetMinifyTemplates( string $minifyTemplates = TRUE )

Set boolean if *.phtml templates will be minimized before saving into result file

Set boolean if *.phtml templates will be minimized before saving into result file

Parameters

$minifyTemplates

Returns

Packager_Phar

Overrides

Packager_Common_Base::SetMinifyTemplates()
public Packager_Phar
# SetMinifyPhp( string $minifyPhp = TRUE )

Set boolean if *.php scripts will be minimized before saving into result file

Set boolean if *.php scripts will be minimized before saving into result file

Parameters

$minifyPhp

Returns

Packager_Phar

Overrides

Packager_Common_Base::SetMinifyPhp()
public Packager_Php
# SetStaticCopies( array $staticCopies = [/* '/from-dir' => '/to-dir', '/filename', '/dirname' */] )

Set array with statically copied files or directories from ./development to ./release directory. If key is numeric, source and destination relative path are the same. If key is string, source relative path is defined by array key and destination relative path is defined by array value.

Set array with statically copied files or directories from ./development to ./release directory. If key is numeric, source and destination relative path are the same. If key is string, source relative path is defined by array key and destination relative path is defined by array value.

Parameters

$staticCopies

Returns

Packager_Php

Overrides

Packager_Common_Base::SetStaticCopies()
public Packager_Phar
# MergeConfiguration( array $cfg = [] )

Merge multilevel configuration array with previously initialized values. New values sent into this function will be used preferred.

Merge multilevel configuration array with previously initialized values. New values sent into this function will be used preferred.

Parameters

$cfg

Returns

Packager_Phar

Overrides

Packager_Common_Base::MergeConfiguration()
public Packager_Phar
# Run( )

Run PHAR compilation process, print output to CLI or browser

Run PHAR compilation process, print output to CLI or browser

Returns

Packager_Phar
Methods inherited from Packager_Phar_ResultCompleter
completingJob(), mainJob(), notify(), renameJob()
Methods inherited from Packager_Common_StaticCopies
cleanReleaseDir(), copyStaticFilesAndFolders()
Methods inherited from Packager_Common_Base
AddIncludeFirst(), AddIncludeLast(), AddIncludePatterns(), ErrorHandler(), ExceptionHandler(), KeepPhpFunctions(), PreRun(), PrintFilesToPack(), ReplacePhpFunctions(), SetAutoloadingOrderDetection(), SetIncludeFirst(), SetIncludeLast(), SetIncludePatterns(), SetKeepPhpDocComments(), SetPhpFileSystemMode(), ShutdownHandler(), __construct(), completeAllFiles(), completeJobAndParams(), decodeJson(), encodeFilesToUtf8(), excludeFilesByCfg(), executeJobAndGetResult(), sendJsonResultAndExit(), sendResult(), shrinkPhpCode(), shrinkPhpCodeReducePhpDocComment()
Properties inherited from Packager_Common_StaticCopies
$staticallyCopiedFiles
Properties inherited from Packager_Common_Base
$autoLoadedFiles, $cfg, $cliScriptName, $compilationType, $errorHandlerData, $errorResponse, $exceptionsMessages, $exceptionsTraces, $fileTypesStoringTypes, $files, $includedFilesCountTillNow, $instance, $templatesExtensions
Packager API Documentation API documentation generated by ApiGen