summaryrefslogtreecommitdiffstats
path: root/admin/survey/minify/lib/Minify/ServeConfiguration.php
blob: 1c30708d07fbee8fb37dd8c372744b5f4e9a17c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
 * Class Minify_ServeConfiguration
 * @package Minify
 */

/**
 * A configuration for Minify::serve() determined by a controller
 *
 * @package Minify
 */
class Minify_ServeConfiguration
{

    /**
     * @var Minify_SourceInterface[]
     */
    protected $sources;

    /**
     * @var array
     */
    protected $options;

    /**
     * @var string
     */
    protected $selectionId = '';

    /**
     * @param array                    $options
     * @param Minify_SourceInterface[] $sources
     * @param string                   $selectionId
     */
    public function __construct(array $options, array $sources = array(), $selectionId = '')
    {
        $this->options = $options;
        $this->sources = $sources;
        $this->selectionId = $selectionId;
    }

    /**
     * @return array
     */
    public function getOptions()
    {
        return $this->options;
    }

    /**
     * @return Minify_SourceInterface[]
     */
    public function getSources()
    {
        return $this->sources;
    }

    /**
     * Short name to place inside cache id
     *
     * The setupSources() method may choose to set this, making it easier to
     * recognize a particular set of sources/settings in the cache folder. It
     * will be filtered and truncated to make the final cache id <= 250 bytes.
     *
     * @return string
     */
    public function getSelectionId()
    {
        return $this->selectionId;
    }
}