PhpMinify
[ class tree: PhpMinify ] [ index: PhpMinify ] [ all elements ]

Class: PhpMinify

Source Location: /PhpMinify.php

Class Overview


PHP Minify class


Variables

Constants

Methods



Class Details

[line 22]
PHP Minify class



[ Top ]


Class Variables

$_minifiedFiles = array()

[line 53]

Minified files



Tags:

access:  protected

Type:   array


[ Top ]

$_options = array(
        self::OPT_INPUT_PATH => 'input/',
        self::OPT_OUTPUT_PATH => 'output/',
        self::OPT_INPUT_PATTERNS => array('/\.php$/'),self::OPT_SKIP_PATTERNS=>array('/^\./'),self::OPT_TRACK_MINIFIED=>true,self::OPT_STRIP_TABULATION=>false)

[line 39]

Options



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


method getMinifiedFiles [line 107]

array getMinifiedFiles( )

Get minified files



Tags:

access:  public


[ Top ]

constructor __construct [line 60]

PhpMinify __construct( $options)

Constructor



Tags:

access:  public


Parameters:

array   $options   Options to configure

[ Top ]

method run [line 69]

void run( )

Run minifier



Tags:

access:  public


[ Top ]

method setOptions [line 86]

void setOptions( $options)

Set options



Tags:

access:  public


Parameters:

array   $options   Options to configure

[ Top ]

method _checkInputPath [line 384]

void _checkInputPath( )

Check input path



Tags:

throws:  PhpMinify_Exception
access:  protected


[ Top ]

method _checkOutputPath [line 396]

void _checkOutputPath( )

Check output path



Tags:

throws:  PhpMinify_Exception
access:  protected


[ Top ]

method _createDirectory [line 285]

void _createDirectory( string $dirPath)

Create directory



Tags:

throws:  PhpMinify_Exception
access:  protected


Parameters:

string   $dirPath   Directory path

[ Top ]

method _minifyPath [line 119]

void _minifyPath( string $path)

Minify given path



Tags:

throws:  PhpMinify_Exception
access:  protected


Parameters:

string   $path   Current path to minify

[ Top ]

method _replaceBrackets [line 269]

string _replaceBrackets( string $fileContent)

Replace brackets



Tags:

access:  protected


Parameters:

string   $fileContent   File content

[ Top ]

method _replaceNewLines [line 253]

string _replaceNewLines( string $fileContent)

Replace new lines



Tags:

access:  protected


Parameters:

string   $fileContent   File content

[ Top ]

method _runMinify [line 171]

void _runMinify( string $filePath)

Run minify on an input file



Tags:

access:  protected


Parameters:

string   $filePath   File path to minify

[ Top ]

method _stripComments [line 310]

string _stripComments( string $fileContent)

Strip comments



Tags:

access:  protected


Parameters:

string   $fileContent   File content

[ Top ]

method _stripEmptyLines [line 347]

string _stripEmptyLines( string $fileContent)

Strip empty lines



Tags:

access:  protected


Parameters:

string   $fileContent   File content

[ Top ]

method _stripTabulation [line 360]

string _stripTabulation( string $fileContent)

Strip tabulation



Tags:

access:  protected


Parameters:

string   $fileContent   File content

[ Top ]

method _writeOutputFile [line 222]

void _writeOutputFile( string $filePath, string $fileContent)

Write output file



Tags:

throws:  PhpMinify_Exception
access:  protected


Parameters:

string   $filePath   Output file path (absolute)
string   $fileContent   File content

[ Top ]


Class Constants

OPT_INPUT_PATH =  'input_path'

[line 27]

Options


[ Top ]

OPT_INPUT_PATTERNS =  'input_patterns'

[line 29]


[ Top ]

OPT_OUTPUT_PATH =  'output_path'

[line 28]


[ Top ]

OPT_SKIP_PATTERNS =  'skip_patterns'

[line 30]


[ Top ]

OPT_STRIP_TABULATION =  'strip_tabulation'

[line 32]


[ Top ]

OPT_TRACK_MINIFIED =  'track_minified'

[line 31]


[ Top ]



Documentation generated on Sun, 13 Nov 2011 20:53:19 +0100 by phpDocumentor 1.4.3