Re: Documention problems

From: Date: Thu, 09 Aug 2001 19:26:00 +0000
Subject: Re: Documention problems
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1362@lists.php.net to get a copy of this message
Alexander Merz wrote:
A few comments about PHPDoc documention, please keep the in mind: - PHPDoc supports a @package tag to organize classes into packages ie "Net". But this works only if a class inherit from a class called like the package name or from nothing. Example
    works not, because it inherits from PEAR:
    /**
    * @package Net
    */
    class Net_Smtp extends PEAR
    {
    }
    this works
    /**
    * @package Net
    */
    class Net_Smtp extends Net
    {}
    or
    /**
    * @package Net
    */
    class Net_Smtp
    {}
A work around for inheriting PEAR is to create a dummy class called like the package name.
    /**
    * @package Dummy
    */
    class Dummy extends PEAR
    { // do nothing }
    /**
    * @package Dummy
    */
    class Dummy_DAU extends Dummy
    {}
- PHPDoc can't handle more then one class in a file - the syntax of the @param tag is
    @param vartype (classname) varname descripton
not
    @param varname vartype description
or
    @param varname vartype_in_the_description
    ( "@param $parameter a string with the data")
Make sure that the varname contain the '$' or '&$'(!), if it is a reference You don't need to markup optional parameter, PHPDoc do this for you.
I refuse to fill my code with crud to get around bugs in PHPDoc. This should be fixed in PHPDoc or one of the alternatives. - Stig

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