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])
Afficher le fichier Open project: mrclay/minify Class Usage Examples

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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 méthode

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 méthode

public getContent ( )

getContentType() public méthode

public getContentType ( )

getFilePath() public méthode

public getFilePath ( )

getId() public méthode

public getId ( )

getLastModified() public méthode

public getLastModified ( )

getMinifier() public méthode

public getMinifier ( )

getMinifierOptions() public méthode

public getMinifierOptions ( )

setMinifier() public méthode

public setMinifier ( $minifier = null )

setMinifierOptions() public méthode

public setMinifierOptions ( array $options )
$options array

setupUriRewrites() public méthode

public setupUriRewrites ( )

Property Details

$content protected_oe property

protected string $content
Résultat 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
Résultat callable

$id protected_oe property

protected string $id
Résultat 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