svn: /phd/trunk/phpdotnet/phd/Package/IDE/ Functions.php

From: Date: Wed, 11 Nov 2009 03:56:34 +0000
Subject: svn: /phd/trunk/phpdotnet/phd/Package/IDE/ Functions.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5316@lists.php.net to get a copy of this message
moacir Wed, 11 Nov 2009 03:56:34 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=290498 Log: Adding support to notes Changed paths: U phd/trunk/phpdotnet/phd/Package/IDE/Functions.php Modified: phd/trunk/phpdotnet/phd/Package/IDE/Functions.php =================================================================== --- phd/trunk/phpdotnet/phd/Package/IDE/Functions.php 2009-11-11 03:14:13 UTC (rev 290497) +++ phd/trunk/phpdotnet/phd/Package/IDE/Functions.php 2009-11-11 03:56:34 UTC (rev 290498) @@ -4,11 +4,13 @@ class Package_IDE_Functions extends Format { protected $elementmap = array( + 'caution' => 'format_notes', 'entry' => 'format_changelog_entry', 'function' => 'format_seealso_entry', 'methodparam' => 'format_methodparam', 'methodname' => 'format_seealso_entry', 'member' => 'format_member', + 'note' => 'format_notes', 'refentry' => 'format_refentry', 'refname' => 'name', 'refnamediv' => 'format_suppressed_tags', @@ -17,6 +19,8 @@ 'row' => 'format_changelog_row', 'set' => 'format_set', 'tbody' => 'format_changelog_tbody', + 'tip' => 'format_notes', + 'warning' => 'format_notes', ); protected $textmap = array( 'entry' => 'format_changelog_entry_text', @@ -412,7 +416,29 @@ return $content; } } - + + public function format_notes($open, $name, $attrs, $props) { + if ($this->role != "notes") { + return ''; + } + if ($open) { + $content = "<note>"; + $content .= "\n<type>" . $name . "</type>\n"; + $content .= "<description>"; + //Read the description + $reader = ReaderKeeper::getReader(); + do { + $reader->read(); + //Skipping the title + if ($reader->nodeType === \XMLReader::ELEMENT && $reader->name != 'title') { + $content .= trim($reader->readContent()); + } + } while ($reader->name != $name); + $content .= "</description>\n</note>\n"; + return $content; + } + } + public function format_errors($open, $name, $attrs, $props) { if ($open) { return "\n\n<errors>\n<description>";

« previous php.doc.cvs (#5316) next »