3 * Default HTML Renderer based on templates.
5 class PhpdocHTMLRenderer extends PhpdocRendererObject {
10 * @var object IntegratedTemplates $tpl
15 * XML data accessor object.
17 * @var object PhpdocAccessor
22 * Rootpath for Templatefiles.
24 * @var string $templateRoot
25 * @see setTemplateRoot()
27 var $templateRoot = "";
30 * Directory path prefix.
37 * Sets a directory path prefix.
41 function setPath($path) {
43 if ("" != $path && "/" != substr($path, -1))
50 * Sets the template directory.
54 function setTemplateRoot($templateRoot) {
56 if ("" != $path && "/" != substr($templateRoot, -1))
59 $this->templateRoot = $templateRoot;
60 } // end func setTemplateRoot
63 * Encodes the given string.
65 * This function gets used to encode all userdependend
66 * elements of the phpdoc xml files. Use it to
67 * customize your rendering result: beware newlines (nl2br()),
70 * @param string String to encode
71 * @return string $string Encoded string
73 function encode($string) {
74 return nl2br(htmlspecialchars($string));
77 } // end class PhpdocHTMLRenderer