svn: /phd/trunk/phpdotnet/phd/Package/Default/ Manpage.php

From: Date: Fri, 24 Jul 2009 14:40:00 +0000
Subject: svn: /phd/trunk/phpdotnet/phd/Package/Default/ Manpage.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4506@lists.php.net to get a copy of this message
moacir Fri, 24 Jul 2009 14:40:00 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=284703 Log: fixing bug #49005 Bug: http://bugs.php.net/49005 (Assigned) Reference sign missing Changed paths: U phd/trunk/phpdotnet/phd/Package/Default/Manpage.php Modified: phd/trunk/phpdotnet/phd/Package/Default/Manpage.php =================================================================== --- phd/trunk/phpdotnet/phd/Package/Default/Manpage.php 2009-07-24 14:20:40 UTC (rev 284702) +++ phd/trunk/phpdotnet/phd/Package/Default/Manpage.php 2009-07-24 14:40:00 UTC (rev 284703) @@ -100,7 +100,7 @@ 'paramdef' => 'format_suppressed_tags', 'parameter' => array( /* DEFAULT */ 'format_suppressed_tags', - 'methodparam' => 'format_suppressed_tags', + 'methodparam' => 'format_parameter_method', 'code' => '\\fI', ), 'productname' => 'format_suppressed_tags', @@ -379,7 +379,9 @@ "optional" => $opt, "type" => "", "name" => "", - "initializer" => ""); + "initializer" => "", + "reference" => false, + ); } return ""; } @@ -390,7 +392,9 @@ "optional" => false, "type" => "void", "name" => "", - "initializer" => ""); + "initializer" => "", + "reference" => false, + ); } return ""; } @@ -400,6 +404,13 @@ return ""; } + public function format_parameter_method($open, $name, $attrs, $props) { + if ($open && isset($attrs[Reader::XMLNS_DOCBOOK]["role"]) && $attrs[Reader::XMLNS_DOCBOOK]["role"] == "reference") { + $this->cchunk['methodsynopsis']['params'][count($this->cchunk['methodsynopsis']['params'])-1]['reference'] = true; + } + return ""; + } + public function format_parameter_method_text($value, $tag) { $this->cchunk['methodsynopsis']['params'][count($this->cchunk['methodsynopsis']['params'])-1]['name'] = $value; return ""; @@ -430,9 +441,14 @@ return "\n.br"; $params = array(); // write the formatted synopsis - foreach ($this->cchunk['methodsynopsis']['params'] as $parameter) - array_push( $params, ($parameter['optional'] ? "[" : "") . $parameter['type'] . - ($parameter['name'] ? " \\fI$" . $parameter['name'] . "\\fP" : "") . ($parameter['initializer'] ? " = " . $parameter['initializer'] : "") . ($parameter['optional'] ? "]" : "") ); + foreach ($this->cchunk['methodsynopsis']['params'] as $parameter) { + array_push($params, ($parameter['optional'] ? "[" : "") + . $parameter['type'] + . ($parameter['reference'] ? " \\fI&\\fP" : " ") + . ($parameter['name'] ? "\\fI$" . $parameter['name'] . "\\fP" : "") + . ($parameter['initializer'] ? " = " . $parameter['initializer'] : "") + . ($parameter['optional'] ? "]" : "") ); + } $ret = "\n(" . join($params, ", ") . ")"; $this->cchunk['methodsynopsis']['params'] = array();

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