1 | <?php |
||
10 | class FileContainer |
||
11 | { |
||
12 | const TYPE_UNKNOWN = 'unknown'; |
||
13 | const TYPE_SCSS = 'scss'; |
||
14 | const TYPE_LESS = 'less'; |
||
15 | public static $supportedTypes = [ |
||
16 | self::TYPE_SCSS, |
||
17 | self::TYPE_LESS |
||
18 | ]; |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $inputPath; |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $outputPath; |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $inputContent; |
||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $outputContent; |
||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $type; |
||
39 | |||
40 | /** |
||
41 | * @param string $inputPath |
||
42 | * @param string $outputPath |
||
43 | */ |
||
44 | 18 | public function __construct($inputPath, $outputPath) |
|
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | 7 | public function getOutputPath() |
|
58 | |||
59 | /** |
||
60 | * @param string $path |
||
61 | * |
||
62 | * @return $this |
||
63 | */ |
||
64 | 18 | public function setOutputPath($path) |
|
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | 11 | public function getInputContent() |
|
78 | |||
79 | /** |
||
80 | * @param string $content |
||
81 | * |
||
82 | * @return $this |
||
83 | */ |
||
84 | 12 | public function setInputContent($content) |
|
90 | |||
91 | 18 | public function getInputPath() |
|
95 | |||
96 | /** |
||
97 | * @param string $path |
||
98 | * |
||
99 | * @return $this |
||
100 | */ |
||
101 | 18 | public function setInputPath($path) |
|
108 | |||
109 | /** |
||
110 | * @return string |
||
111 | */ |
||
112 | 13 | public function getOutputContent() |
|
116 | |||
117 | /** |
||
118 | * @param string $content |
||
119 | * |
||
120 | * @return $this |
||
121 | */ |
||
122 | 8 | public function setOutputContent($content) |
|
128 | |||
129 | /** |
||
130 | * @return string |
||
131 | */ |
||
132 | 15 | public function getType() |
|
136 | |||
137 | /** |
||
138 | * @param string $type |
||
139 | * |
||
140 | * @return $this |
||
141 | */ |
||
142 | 18 | public function setType($type) |
|
148 | |||
149 | 18 | protected function detectInputTypeByInputPath() |
|
161 | } |
||
162 |