Re: phpDoc @static tag usage and traduction/implementation

From: Date: Tue, 18 Dec 2007 21:19:21 +0000
Subject: Re: phpDoc @static tag usage and traduction/implementation
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48786@lists.php.net to get a copy of this message
Laurent Laville a écrit :
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;
    &note.notstatic;
</refsect1> While I expected to have : <refsect1 id="package.pear.pear-info.pear-info.setproxy.note">
    &title.note;
    &note.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
As nobody else vote or gave its opinion; myself I vote +1 for 2. as we want => canstatic (more freedom than 1.) Chuck, as I've already said, I can't take decision about action to fix one solution or another, but &note.notstatic; is definitively a bug for me (in such situation). in reply to your feedback/ask http://pear.php.net/bugs/bug.php?id=11540
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


« previous php.pear.dev (#48786) next »