PHP Class Minify_Source, minify

This allows per-source minification options and the mixing of files with content from other sources.
Author: Stephen Clay ([email protected])
Exibir arquivo Open project: mrclay/minify Class Usage Examples

Protected Properties

Property Type Description
$content string
$contentType HTTP Content Type (Minify requires one of the constants Minify::TYPE_*)
$filepath full path of file
$getContentFunc callable
$id string
$lastModified time of last modification
$minifier minifier function specifically for this source.
$minifyOptions minification options specific to this source.

Public Methods

Method Description
__construct ( array $spec ) Create a Minify_Source
getContent ( )
getContentType ( )
getFilePath ( )
getId ( )
getLastModified ( )
getMinifier ( )
getMinifierOptions ( )
setMinifier ( $minifier = null )
setMinifierOptions ( array $options )
setupUriRewrites ( )

Method Details

__construct() public method

In the $spec array(), you can either provide a 'filepath' to an existing file (existence will not be checked!) or give 'id' (unique string for the content), 'content' (the string content) and 'lastModified' (unixtime of last update).
public __construct ( array $spec )
$spec array options

getContent() public method

public getContent ( )

getContentType() public method

public getContentType ( )

getFilePath() public method

public getFilePath ( )

getId() public method

public getId ( )

getLastModified() public method

public getLastModified ( )

getMinifier() public method

public getMinifier ( )

getMinifierOptions() public method

public getMinifierOptions ( )

setMinifier() public method

public setMinifier ( $minifier = null )

setMinifierOptions() public method

public setMinifierOptions ( array $options )
$options array

setupUriRewrites() public method

public setupUriRewrites ( )

Property Details

$content protected_oe property

protected string $content
return string

$contentType protected_oe property

HTTP Content Type (Minify requires one of the constants Minify::TYPE_*)
protected $contentType

$filepath protected_oe property

full path of file
protected $filepath

$getContentFunc protected_oe property

protected callable $getContentFunc
return callable

$id protected_oe property

protected string $id
return string

$lastModified protected_oe property

time of last modification
protected $lastModified

$minifier protected_oe property

minifier function specifically for this source.
protected $minifier

$minifyOptions protected_oe property

minification options specific to this source.
protected $minifyOptions