return $this->path;
}
+ /**
+ * Get the filename usable as HTML anchor.
+ *
+ * @return string
+ */
+ function getAnchorName()
+ {
+ return str_replace(' ', '-', $this->getFilename());
+ }
+
/**
* Return the full path to the file
*
public function getRenderedContent(Tool_Result $res = null)
{
- $ext = $this->getExt();
- $class = '\\phorkie\\Renderer_Unknown';
-
- if (isset($GLOBALS['phorkie']['languages'][$ext]['renderer'])) {
- $class = $GLOBALS['phorkie']['languages'][$ext]['renderer'];
- } else if ($this->isText()) {
- $class = '\\phorkie\\Renderer_Geshi';
- } else if (isset($GLOBALS['phorkie']['languages'][$ext]['mime'])) {
- $type = $GLOBALS['phorkie']['languages'][$ext]['mime'];
- if (substr($type, 0, 6) == 'image/') {
- $class = '\\phorkie\\Renderer_Image';
- }
- }
-
- $rend = new $class();
- return $rend->toHtml($this, $res);
+ $cache = new Renderer_Cache();
+ return $cache->toHtml($this, $res);
}
/**