| 1 | <?php |
||
| 7 | class ConfigHashReplacer implements HashReplacerInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var WriterInterface |
||
| 11 | */ |
||
| 12 | private $writer; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var CacheBuster |
||
| 16 | */ |
||
| 17 | private $cacheBuster; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * HashReplacer constructor. |
||
| 21 | * @param CacheBuster $cacheBuster |
||
| 22 | * @param WriterInterface $writer |
||
| 23 | */ |
||
| 24 | 2 | public function __construct(CacheBuster $cacheBuster, WriterInterface $writer) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Generate and save new hash |
||
| 32 | * @return string New Hash |
||
| 33 | * @throws \Exception |
||
| 34 | */ |
||
| 35 | 2 | public function replaceHash() |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @return string New hash |
||
| 46 | * @throws \Exception |
||
| 47 | */ |
||
| 48 | 2 | public function writeHash($currentHash, $hash) |
|
| 65 | } |
||
| 66 |