Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | <?php |
2 | |||||
3 | use MatthiasMullie\Minify\CSS; | ||||
4 | |||||
5 | class CSSminifierExtended extends CSS { | ||||
6 | |||||
7 | public function getDataHash() { | ||||
8 | return sha1(json_encode($this->accessProtected($this,'data'))); | ||||
9 | } | ||||
10 | |||||
11 | private function accessProtected($obj, $prop) { | ||||
12 | $reflection = new ReflectionClass($obj); | ||||
13 | $property = $reflection->getProperty($prop); | ||||
14 | $property->setAccessible(true); | ||||
15 | return $property->getValue($obj); | ||||
16 | } | ||||
17 | |||||
18 | } |