PluginProbe
WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript / trunk
WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript vtrunk
trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.4 1.5 1.5.1 1.6 2.0 2.0.1
wp-super-minify / includes / min / lib / Minify / ServeConfiguration.php

ServeConfiguration.php in WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript trunk, at includes/min/lib/Minify/ServeConfiguration.php

72 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class Minify_ServeConfiguration
4 * @package Minify
5 */
6
7 /**
8 * A configuration for Minify::serve() determined by a controller
9 *
10 * @package Minify
11 */
12 class Minify_ServeConfiguration
13 {
14
15 /**
16 * @var Minify_SourceInterface[]
17 */
18 protected $sources;
19
20 /**
21 * @var array
22 */
23 protected $options;
24
25 /**
26 * @var string
27 */
28 protected $selectionId = '';
29
30 /**
31 * @param array $options
32 * @param Minify_SourceInterface[] $sources
33 * @param string $selectionId
34 */
35 public function __construct(array $options, array $sources = array(), $selectionId = '')
36 {
37 $this->options = $options;
38 $this->sources = $sources;
39 $this->selectionId = $selectionId;
40 }
41
42 /**
43 * @return array
44 */
45 public function getOptions()
46 {
47 return $this->options;
48 }
49
50 /**
51 * @return Minify_SourceInterface[]
52 */
53 public function getSources()
54 {
55 return $this->sources;
56 }
57
58 /**
59 * Short name to place inside cache id
60 *
61 * The setupSources() method may choose to set this, making it easier to
62 * recognize a particular set of sources/settings in the cache folder. It
63 * will be filtered and truncated to make the final cache id <= 250 bytes.
64 *
65 * @return string
66 */
67 public function getSelectionId()
68 {
69 return $this->selectionId;
70 }
71 }
72