From 9daf4133bf6f61cbe3787a46b021d261242a85f0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 19 May 2007 08:34:02 +0100 Subject: add tagwall --- tw/output/HL_DEBUG_output.php | 74 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 tw/output/HL_DEBUG_output.php (limited to 'tw/output/HL_DEBUG_output.php') diff --git a/tw/output/HL_DEBUG_output.php b/tw/output/HL_DEBUG_output.php new file mode 100644 index 000000000..4a2521bd4 --- /dev/null +++ b/tw/output/HL_DEBUG_output.php @@ -0,0 +1,74 @@ +highlight( "<$tag>" ); + $attr = null; + foreach ($attributes as $value) + { + if($value[1]) $attr .= ' '.$value[0].'="'.$value[1].'"'; + } + return $this->highlight( "<$tag$attr>" ); + } + + function single ($tag, &$attributes) + { + if($attributes == null) + return $this->highlight( "<$tag />" ); + $attr = null; + foreach ($attributes as $value) + { + if($value[1]) $attr .= $value[0].'="'.$value[1].'" '; + } + return $this->highlight( "<$tag $attr/>" ); + } + + // template for end tags + function close ($tag) + { + return $this->highlight( "" ); + } + + function template_end() { return null; } + + + function highlight($string) + { + $string = str_replace("&","&",$string); + return ''.str_replace("<","<",$string).''; + } + +} //END class HTML_output + +?> \ No newline at end of file -- cgit v1.2.3