<?php
/**
- * Generic cached assset server...
+ * Generic cached assset server... -- No security om this.. should only return compressed CSS/JS
*
- * Hydra generates a url for the compressed files as /Asset/css/xxxx.yyy.zzz
+ * Does a few tricks with headers to improve caching...
*
+ *
+ * Also includes code to generate assets...
+ *
+ * methods outputJavascriptDir / outputCssDir generate links to
+ * BASEURL/Asset/css/xxxx.yyy.zzz
+ * BASEURL/Asset/js/xxxx.yyy.zzz
+ *
+ * then
+ * we deliver the file from
+ * SESSION-DIR/{$www-user}-{$ff->project}-$ff->version}-{js|css}-compile/{filename}/PATH';
+ *
+ *
*/
require_once 'Pman.php';
class Pman_Core_Asset extends Pman {
-
-
+
var $types = array(
'css' => 'text/css',
'js' => 'text/javascript',
);
+ function getAuth()
+ {
+ return true;
+ }
+
function get($s='')
{
-
+
+ $this->sessionState(0);
+
$bits = explode('/', $s);
if (empty($bits[0]) || empty($bits[1]) || !isset($this->types[$bits[0]])) {