class ClosureCompilerService extends OnlineMinifier

Properties

string $cacheDir from  Minifier
bool $keepGoing from  Minifier
Client $httpClient from  OnlineMinifier
string $compilationLevel
bool $excludeDefaultExterns
string $externs
string $url

Methods

string
minify(string $src)

Compile given JavaScript source via the Closure Compiler Service

string
get(string $src)

Minify given JavaScript source and cache the result if applicable

from  Minifier
array|string
getCacheDifferentiator()

Return a value that uniquely identifies this minifier's configuration

string
getFromCache(string $src)

Get the minified source from cache, or minify and cache the result

from  Minifier
void
__construct()

Constructor

string
decodeResponse(string $response)

Decode the response returned by the Closure Compiler service

string
generateRequestBody(string $src)

Generate the request body for given code

string|false
query(string $body)

Query the Closure Compiler service

Details

at line 65
string minify(string $src)

Compile given JavaScript source via the Closure Compiler Service

Parameters

string $src

JavaScript source

Return Value

string

Minified source

in Minifier at line 38
string get(string $src)

Minify given JavaScript source and cache the result if applicable

Parameters

string $src

JavaScript source

Return Value

string

Minified source

at line 47
array|string getCacheDifferentiator()

Return a value that uniquely identifies this minifier's configuration

Return Value

array|string

in Minifier at line 71
protected string getFromCache(string $src)

Get the minified source from cache, or minify and cache the result

Parameters

string $src

JavaScript source

Return Value

string

Minified source

at line 38
void __construct()

Constructor

Return Value

void

at line 83
protected string decodeResponse(string $response)

Decode the response returned by the Closure Compiler service

Parameters

string $response

Response body

Return Value

string

Minified code

at line 114
protected string generateRequestBody(string $src)

Generate the request body for given code

Parameters

string $src

JavaScript source

Return Value

string

Compiled source

at line 142
protected string|false query(string $body)

Query the Closure Compiler service

Parameters

string $body

Request body

Return Value

string|false

Response body, or FALSE