Class ScriptReorganizer_Strategy_Pack

Description

Implements interfaces:

Advanced strategy

Reorganizes scripts by applying the Quiet strategy as well as by replacing (1) EOLs according to the pack mode - see below (2) two or more consecutive spaces and/or tabs with a single space char.

Multiple consecutive EOLs are replaced either as defined (1) in the default mode by a single EOL or (2) in the extreme mode by a single space char.

Warning: With ScriptReorganizer optimized source code the tracking of report error messages of the PHP Engine will definitively get cumbersome, when the extreme mode of the Pack strategy is applied. Reason being: all statements are organized on one line only. It is crucial to throughout test again - not only unit test - the code after optimizing it and before building a release to deploy.

If the extreme pack mode strategy is used for packaging, a non-ScriptReorganized source code tree should be shipped together with the optimized one, to enable third parties to track down undiscoverd bugs.

Located in /Strategy/Pack.php (line 65)


	
			
Method Summary
ScriptReorganizer_Strategy_Pack __construct ([boolean $oneLiner = false])
string reformat (string &$content, string $eol)
Methods
Constructor __construct (line 76)

Constructor

  • access: public
ScriptReorganizer_Strategy_Pack __construct ([boolean $oneLiner = false])
  • boolean $oneLiner: true, if the script's packing should result in only one line of code - extreme pack mode; otherwise false - default pack mode
reformat (line 93)

Performs the main reorganization of the script's content

  • return: a string representing the reorganized content
  • access: public
string reformat (string &$content, string $eol)
  • string &$content: a string representing the script's content
  • string $eol: a string representing the EOL identifier to use

Documentation generated on Tue, 22 Nov 2005 01:57:11 +0100 by phpDocumentor 1.3.0RC3