Minify_JS_ClosureCompiler::__construct PHP Method

__construct() public method

public __construct ( array $options = [] )
$options array Options with keys available below: fallbackFunc : (callable) function to minify if service unavailable. Default is JSMin. compilerUrl : (string) URL to closure compiler server maxBytes : (int) The maximum amount of bytes to be sent as js_code in the POST request. Defaults to 200000. additionalParams : (string[]) Additional parameters to pass to the compiler server. Can be anything named in https://developers.google.com/closure/compiler/docs/api-ref except for js_code and output_info
    public function __construct(array $options = array())
    {
        if (isset($options[self::OPTION_FALLBACK_FUNCTION])) {
            $this->fallbackMinifier = $options[self::OPTION_FALLBACK_FUNCTION];
        }
        if (isset($options[self::OPTION_COMPILER_URL])) {
            $this->serviceUrl = $options[self::OPTION_COMPILER_URL];
        }
        if (isset($options[self::OPTION_ADDITIONAL_OPTIONS]) && is_array($options[self::OPTION_ADDITIONAL_OPTIONS])) {
            $this->additionalOptions = $options[self::OPTION_ADDITIONAL_OPTIONS];
        }
        if (isset($options[self::OPTION_MAX_BYTES])) {
            $this->maxBytes = (int) $options[self::OPTION_MAX_BYTES];
        }
    }