code[] = $code;
}
public function file($path)
{
$app = Application::get();
$info = pathinfo($path);
$minfile = sprintf('%s%s/%s.min.%s', $app->getBaseDir(), $info['dirname'], $info['filename'], $info['extension']);
if (file_exists($minfile)) {
$origpath = $app->getBaseDir().$path;
if (filemtime($minfile) > filemtime($origpath))
$path = sprintf('%s/%s.min.%s', $info['dirname'], $info['filename'], $info['extension']);
}
$this->files[$path] = true;
}
public function toString()
{
$app = Application::get();
$ret = '';
foreach (array_keys($this->files) as $file)
$ret .= sprintf(''."\n", $app->getBaseURL(), $file);
if (count($this->code)) {
$ret .= '\n";
}
return $ret;
}
}