Re: phpdoc comments for arguments read via func_get_args()
| From: | Greg Beaver | Date: | Fri, 27 Jan 2006 16:38:29 +0000 |
| Subject: | Re: phpdoc comments for arguments read via func_get_args() | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41112@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
> Hi,
>
> what is the preferred way of documenting methods that can accept an
> arbitrary (with potentially a minimum) number of parameters.
>
> for example here i want to support 2 or more parameters.
>
> /**
> * returns string to concatenate two or more string parameters
> *
> * @return string to caoncatenate two strings
> * @access public
> */
> function concat($value1, $value2)
> {
> $args = func_get_args();
> return "(".implode(' || ', $args).")";
> }
/**
* returns string to concatenate two or more string parameters
*
* @param string $value1
* @param string $value2
* @param string $values...
* @return string to concatenate two strings
*/
Greg