Re: How to publish docs for a PECL package
| From: | Felipe Pena | Date: | Thu, 04 Dec 2008 23:32:42 +0000 |
| Subject: | Re: How to publish docs for a PECL package | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5963@lists.php.net to get a copy of this message | ||
Hi Christian,
Em Sex, 2008-12-05 às 00:02 +0100, Christian Hammers escreveu:
> docgen seems unable to get the types and names of the arguments
> from PECL methods. I assume that my "proto" lines inside the *.c do
> not get into the shared object.
> Is there any workaround? If so it should be documented, too.
>
> Warnings:
> - en/reference/idn/functions/idn-to-ascii.xml
> -- Parameter name not found, param1 used
> -- Type hint for parameter `1' not found, 'string' used
>
This because idn extension doesn't use arginfo structs.
The docgen works based on Reflection info, which access information
about parameters using the arginfo structs.
For example, for count() function we have:
ZEND_BEGIN_ARG_INFO_EX(arginfo_count, 0, 0, 1)
ZEND_ARG_INFO(0, var)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
Thus reflection can use this information:
$ php --rf count
Function [ <internal:standard> function count ] {
- Parameters [2] {
Parameter #0 [ <required> $var ]
Parameter #1 [ <optional> $mode ]
}
}
In fact, several pecl extensions doesn't use the arginfo stuff, some use
it only to specify a parameter that must be passed by reference.
--
Regards,
Felipe Pena