cvs: phd /formats xhtml.php /themes/php phpdotnet.php

From: Date: Fri, 28 Sep 2007 10:55:53 +0000
Subject: cvs: phd /formats xhtml.php /themes/php phpdotnet.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-66@lists.php.net to get a copy of this message
bjori Fri Sep 28 10:55:53 2007 UTC Modified files: /phd/formats xhtml.php /phd/themes/php phpdotnet.php Log: - Add classsynopsisinfo, methodname support - Improved fieldsynopsis and property support http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.22&r2=1.23&diff_format=u Index: phd/formats/xhtml.php diff -u phd/formats/xhtml.php:1.22 phd/formats/xhtml.php:1.23 --- phd/formats/xhtml.php:1.22 Sun Sep 16 18:58:32 2007 +++ phd/formats/xhtml.php Fri Sep 28 10:55:53 2007 @@ -1,5 +1,5 @@ <?php -/* $Id: xhtml.php,v 1.22 2007/09/16 18:58:32 bjori Exp $ */ +/* $Id: xhtml.php,v 1.23 2007/09/28 10:55:53 bjori Exp $ */ class XHTMLPhDFormat extends PhDFormat { protected $elementmap = array( /* {{{ */ @@ -35,6 +35,7 @@ 'ooclass' => 'b', ), 'classsynopsis' => 'format_classsynopsis', + 'classsynopsisinfo' => 'format_classsynopsisinfo', 'code' => 'code', 'collab' => 'span', 'collabname' => 'span', @@ -56,7 +57,10 @@ ), 'envar' => 'span', 'example' => 'div', - 'fieldsynopsis' => 'format_fieldsynopsis', + 'fieldsynopsis' => array( + /* DEFAULT */ 'format_fieldsynopsis', + 'entry' => 'div', + ), 'filename' => 'var', 'glossterm' => 'span', 'holder' => 'span', @@ -103,7 +107,10 @@ 'productname' => 'span', 'programlisting' => 'format_programlisting', 'propname' => 'span', - 'property' => 'span', + 'property' => array( + /* DEFAULT */ 'span', + 'classsynopsisinfo' => 'format_varname', + ), 'proptype' => 'span', 'refentry' => 'format_chunk', 'reference' => 'format_container_chunk', @@ -241,6 +248,12 @@ return "}</div>"; } + public function format_classsynopsisinfo($open, $name, $attrs) { + if ($open) { + return '<div class="'.$name.'">'; + } + return ";</div>\n"; + } public function format_fieldsynopsis($open, $name, $attrs) { if ($open) { return '<div class="'.$name.'">'; http://cvs.php.net/viewvc.cgi/phd/themes/php/phpdotnet.php?r1=1.14&r2=1.15&diff_format=u Index: phd/themes/php/phpdotnet.php diff -u phd/themes/php/phpdotnet.php:1.14 phd/themes/php/phpdotnet.php:1.15 --- phd/themes/php/phpdotnet.php:1.14 Sun Sep 16 18:58:32 2007 +++ phd/themes/php/phpdotnet.php Fri Sep 28 10:55:53 2007 @@ -1,5 +1,5 @@ <?php -/* $Id: phpdotnet.php,v 1.14 2007/09/16 18:58:32 bjori Exp $ */ +/* $Id: phpdotnet.php,v 1.15 2007/09/28 10:55:53 bjori Exp $ */ class phpdotnet extends PhDHelper { protected $elementmap = array( @@ -10,6 +10,7 @@ 'titleabbrev' => 'format_suppressed_tags', 'type' => array( /* DEFAULT */ 'format_suppressed_tags', + 'classsynopsisinfo' => false, 'fieldsynopsis' => false, 'methodparam' => false, 'methodsynopsis' => false, @@ -56,9 +57,12 @@ ); protected $textmap = array( 'acronym' => 'format_acronym_text', + 'classsynopsisinfo' => 'format_comment_multiline', 'function' => 'format_function_text', + 'methodname' => 'format_function_text', 'type' => array( /* DEFAULT */ 'format_type_text', + 'classsynopsisinfo' => false, 'fieldsynopsis' => false, 'methodparam' => false, 'methodsynopsis' => false, @@ -278,13 +282,13 @@ return ""; } public function format_function_text($value, $tag) { - $link = str_replace(array("_", "::", "->"), "-", $value); + $link = strtolower(str_replace(array("__", "_", "::", "->"), array("", "-", "-", "-"), $value)); if (!substr_compare($this->CURRENT_ID, $link, -strlen($link)) || !($filename = PhDHelper::getFilename("function.$link"))) { - return sprintf("<b>%s()</b>", $value); + return sprintf("<b>%s%s</b>", $value, $tag == "function" ? "()" : ""); } - return sprintf('<a href="%s%s.%s" class="function">%s()</a>', $this->chunked ? "" : "#", $filename, $this->ext, $value); + return sprintf('<a href="%s%s.%s" class="function">%s%s</a>', $this->chunked ? "" : "#", $filename, $this->ext, $value, $tag == "function" ? "()" : ""); } public function format_type_text($type, $tagname) { $t = strtolower($type); @@ -325,7 +329,9 @@ } return sprintf('<span class="%s %s">%2$s</span>', $tagname, $type); } - + public function format_comment_multiline($value, $tag) { + return '<span class="php_comment '.$tag. '_comment">/* ' .$value. ' */</span>'; + } }

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