PHP Class MiniAsset\Filter\ClosureCompiler

Allows you to filter Javascript files through the Google Closure compiler API. The script needs to have web access to run.
Inheritance: extends MiniAsset\Filter\AssetFilter
Mostrar archivo Open project: markstory/mini-asset

Protected Properties

Property Type Description
$_defaults array Defaults.
$_params array - The output_file_name hasn't been included because MiniAsset is used for saving the minified javascript. - The warning_level is automatically handled in self::$_settings.
$_settings array NOTE: statistics and warnings are only used when in debug mode. - level (string) Defaults to WHITESPACE_ONLY. Values: SIMPLE_OPTIMIZATIONS, ADVANCED_OPTIMIZATIONS. - statistics (boolean) Defaults to FALSE. - warnings (mixed) Defaults to FALSE. Values: TRUE or QUIET, DEFAULT, VERBOSE.

Public Methods

Method Description
output ( $filename, $content )

Protected Methods

Method Description
_query ( string $content, array $args = [] ) : string Query the Closure compiler API.

Method Details

_query() protected method

Query the Closure compiler API.
protected _query ( string $content, array $args = [] ) : string
$content string Javascript to compile.
$args array API parameters.
return string

output() public method

public output ( $filename, $content )

Property Details

$_defaults protected_oe property

Defaults.
protected array $_defaults
return array

$_params protected_oe property

- The output_file_name hasn't been included because MiniAsset is used for saving the minified javascript. - The warning_level is automatically handled in self::$_settings.
See also: https://developers.google.com/closure/compiler/docs/api-ref
protected array $_params
return array

$_settings protected_oe property

NOTE: statistics and warnings are only used when in debug mode. - level (string) Defaults to WHITESPACE_ONLY. Values: SIMPLE_OPTIMIZATIONS, ADVANCED_OPTIMIZATIONS. - statistics (boolean) Defaults to FALSE. - warnings (mixed) Defaults to FALSE. Values: TRUE or QUIET, DEFAULT, VERBOSE.
protected array $_settings
return array