mirror of
https://github.com/mrclay/minify.git
synced 2025-08-11 00:24:11 +02:00
Collapse "min" into project root and get unit tests working.
Fixes #472
This commit is contained in:
29
lib/Minify/SourceSet.php
Normal file
29
lib/Minify/SourceSet.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Class Minify_SourceSet
|
||||
* @package Minify
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package Minify
|
||||
*/
|
||||
class Minify_SourceSet {
|
||||
|
||||
/**
|
||||
* Get unique string for a set of sources
|
||||
*
|
||||
* @param Minify_SourceInterface[] $sources Minify_Source instances
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDigest($sources)
|
||||
{
|
||||
$info = array();
|
||||
foreach ($sources as $source) {
|
||||
$info[] = array(
|
||||
$source->getId(), $source->getMinifier(), $source->getMinifierOptions()
|
||||
);
|
||||
}
|
||||
return md5(serialize($info));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user