com phd: Link PHP language constructs marked by <function>: phpdotnet/phd/Package/PHP/XHTML.php

From: Date: Wed, 28 Mar 2012 05:29:07 +0000
Subject: com phd: Link PHP language constructs marked by <function>: phpdotnet/phd/Package/PHP/XHTML.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9965@lists.php.net to get a copy of this message
Commit: b0a3b0bd51f0f883456a0edb60f01aeb5cd9e697 Author: Jakub Vrana <jakub@vrana.cz> Tue, 27 Mar 2012 22:29:07 -0700 Parents: 68977f226592953e80bede26f934b0c5dcae8806 Branches: master Link: http://git.php.net/?p=phd.git;a=commitdiff;h=b0a3b0bd51f0f883456a0edb60f01aeb5cd9e697 Log: Link PHP language constructs marked by <function> Changed paths: M phpdotnet/phd/Package/PHP/XHTML.php Diff: b0a3b0bd51f0f883456a0edb60f01aeb5cd9e697 diff --git a/phpdotnet/phd/Package/PHP/XHTML.php b/phpdotnet/phd/Package/PHP/XHTML.php index 160264c..8e03207 100644 --- a/phpdotnet/phd/Package/PHP/XHTML.php +++ b/phpdotnet/phd/Package/PHP/XHTML.php @@ -435,12 +435,27 @@ abstract class Package_PHP_XHTML extends Package_Generic_XHTML { } public function format_function_text($value, $tag, $display_value = null) { + static $non_functions = array( + "echo" => true, "print" => true, + "include" => true, "include_once" => true, + "require" => true, "require_once" => true, + "return" => true, + ); + if ($display_value === null) { - $display_value = $value . "()"; + $display_value = $value; + if (!isset($non_functions[$value])) { + $display_value .= "()"; + } } - $ref = strtolower(str_replace(array("_", "::", "->"), array("-", "-", "-"), $value)); - if (($filename = $this->getRefnameLink($ref)) !== null) { + if (isset($non_functions[$value])) { + $filename = "function." . str_replace("_", "-", $value); + } else { + $ref = strtolower(str_replace(array("_", "::", "->"), array("-", "-", "-"), $value)); + $filename = $this->getRefnameLink($ref); + } + if ($filename !== null) { if ($this->CURRENT_ID !== $filename) { $rel = $desc = ""; if ($this->role == "seealso") {

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