phpDocumentor array param

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

phpDocumentor array param

helderfelipe
I have an array param  $args($var1=>'',$var2=>'') and i want to speficy the vars of the array in the documentation

now, is this way:
    /**
     * Test
     *
     * @param  array $args
     */
    public function teste($args)
    {
  }
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: phpDocumentor array param

weierophinney
Administrator
-- helderfelipe <[hidden email]> wrote
(on Monday, 11 May 2009, 06:46 PM -0700):

> I have an array param  $args($var1=>'',$var2=>'') and i want to speficy the
> vars of the array in the documentation
>
> now, is this way:
>     /**
>      * Test
>      *
>      * @param  array $args
>      */
>     public function teste($args)
>     {
>   }

What you're doing above is correct. If you want to specify the keys
expected, you usually do so in the "long comment" like this:

    /**
     * Test
     *
     * $args may contain the following keys:
     * - var1: <some description here>
     * - var2: <some description here>
     *
     * @param  array @args
     * @return void
     */

Items prefixed with a '- ' will be treated as bullets by phpDocumentor.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
Loading...