blob: c891cb81ac4aa42728dcfd7c720a29dde108fecb [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001<?php
2
3use MatthiasMullie\Minify\JS;
4
5class JSminifierExtended extends JS {
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}