10 public function __construct($name)
16 * @return integer Unix timestamp
18 public function getExpiryDate(Options $options)
20 $mtime = filemtime($this->getPath());
22 return $mtime + $options->values['smaxage'];
25 public function getMimeType()
27 $ext = substr($this->name, -4);
30 } else if ($ext == '.png') {
32 } else if ($ext == '.png') {
33 return 'application/pdf';
35 return 'application/octet-stream';
38 public function getPath()
40 return $this->config->cacheDir . $this->name;
43 public function getUrl()
45 return $this->config->cacheDirUrl . $this->name;
48 public function setConfig(Config $config)
50 $this->config = $config;