1<?php
2
3/*
4 * This file is part of the Assetic package, an OpenSky project.
5 *
6 * (c) 2010-2014 OpenSky Project Inc
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Assetic\Filter\GoogleClosure;
13
14use Assetic\Asset\AssetInterface;
15use Assetic\Filter\FilterInterface;
16
17/**
18 * Base filter for the Google Closure Compiler implementations.
19 *
20 * @author Kris Wallsmith <kris.wallsmith@gmail.com>
21 */
22abstract class BaseCompilerFilter implements FilterInterface
23{
24    // compilation levels
25    const COMPILE_WHITESPACE_ONLY = 'WHITESPACE_ONLY';
26    const COMPILE_SIMPLE_OPTIMIZATIONS = 'SIMPLE_OPTIMIZATIONS';
27    const COMPILE_ADVANCED_OPTIMIZATIONS = 'ADVANCED_OPTIMIZATIONS';
28
29    // formatting modes
30    const FORMAT_PRETTY_PRINT = 'pretty_print';
31    const FORMAT_PRINT_INPUT_DELIMITER = 'print_input_delimiter';
32
33    // warning levels
34    const LEVEL_QUIET = 'QUIET';
35    const LEVEL_DEFAULT = 'DEFAULT';
36    const LEVEL_VERBOSE = 'VERBOSE';
37
38    // languages
39    const LANGUAGE_ECMASCRIPT3 = 'ECMASCRIPT3';
40    const LANGUAGE_ECMASCRIPT5 = 'ECMASCRIPT5';
41    const LANGUAGE_ECMASCRIPT5_STRICT = 'ECMASCRIPT5_STRICT';
42
43    protected $timeout;
44    protected $compilationLevel;
45    protected $jsExterns;
46    protected $externsUrl;
47    protected $excludeDefaultExterns;
48    protected $formatting;
49    protected $useClosureLibrary;
50    protected $warningLevel;
51    protected $language;
52
53    public function setTimeout($timeout)
54    {
55        $this->timeout = $timeout;
56    }
57
58    public function setCompilationLevel($compilationLevel)
59    {
60        $this->compilationLevel = $compilationLevel;
61    }
62
63    public function setJsExterns($jsExterns)
64    {
65        $this->jsExterns = $jsExterns;
66    }
67
68    public function setExternsUrl($externsUrl)
69    {
70        $this->externsUrl = $externsUrl;
71    }
72
73    public function setExcludeDefaultExterns($excludeDefaultExterns)
74    {
75        $this->excludeDefaultExterns = $excludeDefaultExterns;
76    }
77
78    public function setFormatting($formatting)
79    {
80        $this->formatting = $formatting;
81    }
82
83    public function setUseClosureLibrary($useClosureLibrary)
84    {
85        $this->useClosureLibrary = $useClosureLibrary;
86    }
87
88    public function setWarningLevel($warningLevel)
89    {
90        $this->warningLevel = $warningLevel;
91    }
92
93    public function setLanguage($language)
94    {
95        $this->language = $language;
96    }
97
98    public function filterLoad(AssetInterface $asset)
99    {
100    }
101}
102