1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-17 19:37:22 +02:00

Minify.php : + combine()

builder/_index.html : Unix newlines
This commit is contained in:
Steve Clay
2008-09-04 00:38:08 +00:00
parent 86c09a1cd0
commit f9378dc345
2 changed files with 29 additions and 6 deletions

View File

@@ -323,6 +323,29 @@ class Minify {
} }
} }
/**
* Return combined minified content for a set of sources
*
* No internal caching will be used and the content will not be HTTP encoded.
*
* @param array $sources array of filepaths and/or Minify_Source objects
*
* @return string
*/
public static function combine($sources)
{
$cache = self::$_cache;
self::$_cache = null;
$out = self::serve('Files', array(
'files' => (array)$sources
,'quiet' => true
,'encodeMethod' => ''
,'lastModifiedTime' => 0
));
self::$_cache = $cache;
return $out['content'];
}
/** /**
* On IIS, create $_SERVER['DOCUMENT_ROOT'] * On IIS, create $_SERVER['DOCUMENT_ROOT']
* *