phpDoc @static tag usage and traduction/implementation
| From: | Laurent Laville | Date: | Sun, 09 Dec 2007 17:23:28 +0000 |
| Subject: | phpDoc @static tag usage and traduction/implementation | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-48732@lists.php.net to get a copy of this message | ||
Hi all,
Due to a bug opened [1] for phpDocumentor, I'd like point of view of all phpdoc community users before to reply to feedback asked by Chuck Burgess (hope you understand Chuck).
While I've tried to generate XML DocBook for PEAR Info manual pages I found that a method with @static phpdoc tag [2] was well not rendered.
/**
* Sets PEAR HTTP Proxy Server Address
*
* @param string $proxy PEAR HTTP Proxy Server Address
*
* @static
* @return bool
* @access public
* @since 1.0.6
*/
function setProxy($proxy)
{
$res = define('PEAR_INFO_PROXY', $proxy);
return $res;
}
With phpDocumentor 1.4.0, we got actually:
<refsect1 id="package.pear.pear-info.pear-info.setproxy.note">
&title.note;
¬e.notstatic;
</refsect1>
While I expected to have :
<refsect1 id="package.pear.pear-info.pear-info.setproxy.note">
&title.note;
¬e.shouldstatic;
</refsect1>
Entities are declared into "language-snippets.ent" file
<!ENTITY note.notstatic '<simpara>This function can not be called
statically.</simpara>'>
My question, related to question of Chuck :
What is the difference between, and in what condition shouldstatic must replace canstatic ? :
<!ENTITY note.canstatic '<simpara>This function can be called
statically.</simpara>'>
<!ENTITY note.shouldstatic '<simpara>This function should be called
statically.</simpara>'>
My function can of course be call statically and not ; What is the recommandation :
1. mandatory => shouldstatic
2. as we want => canstatic
3. other
Thanks in advance for answers !
Laurent
[1] http://pear.php.net/bugs/bug.php?id=11540
[2] http://pear.php.net/manual/en/package.pear.pear-info.pear-info.setproxy.php