Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/minify/lib/Minify/Build.php
Go to the documentation of this file.
00001 <?php
00007 require_once 'Minify/Source.php';
00008 
00039 class Minify_Build {
00040     
00046     public $lastModified = 0;
00047     
00054     public static $ampersand = '&amp;';
00055     
00072     public function uri($uri, $forceAmpersand = false) {
00073         $sep = ($forceAmpersand || strpos($uri, '?') !== false)
00074             ? self::$ampersand
00075             : '?';
00076         return "{$uri}{$sep}{$this->lastModified}";
00077     }
00078 
00086     public function __construct($sources) 
00087     {
00088         $max = 0;
00089         foreach ((array)$sources as $source) {
00090             if ($source instanceof Minify_Source) {
00091                 $max = max($max, $source->lastModified);
00092             } elseif (is_string($source)) {
00093                 if (0 === strpos($source, '//')) {
00094                     $source = $_SERVER['DOCUMENT_ROOT'] . substr($source, 1);
00095                 }
00096                 if (is_file($source)) {
00097                     $max = max($max, filemtime($source));
00098                 }
00099             }
00100         }
00101         $this->lastModified = $max;
00102     }
00103 }
 All Data Structures Namespaces Files Functions Variables Enumerations