[...]It seems like we have a problem with the proto's constructions :
From php.net/manual/en/function.dba-fetch.php : string *dba_fetch* ( string key [, int skip, resource handle])
the notation itself is valid in that it says that argument 2 and 3
are both optinal but not independent of each other, so you have either
one or all 3 of them
A user note say that it doesn't work with only one argument. and the proto in the C source file is saying :
2 arguments or 3 (as far as I read it well)
The display is based on the PHP rule, which means that if a parameter is optional, the additional parameters are also optional. There should not be a PHP funciton with a proto, where some parameter not on the end of the param list is optional... ;((
the actual implementation is really violating this rule in that its prototype is "string dba_fetch(string key [, int skip], resource handle)"
there is no way to express both variants with DocBook <methodsynopsis> (and don't even ask about <funcionsynopsis> ;) as you can just flag parameters as optional but can't express dependancy relationships with the given tags and attributs (unless we introduce another role=... 'abuse)
when i (afair it was me?) implemented the stylesheet logic for renderung <methodsynopsis> as prototypes i decided that the first case (optional parameter followed by non-optional is "either both or none") was the "right thing" so implemented stuff this way (i didn't even know we had functions like dba_fetch)
all this just leads me to a different question:
does using <methodsynopsis> really make sense? or is the markup
just making things unnecessary complicated? maybe we should just
drop all that and put in a verbatim prototype instead just like
in the C source instead ...?
-1 Getting rid of <methodsynopsis> to solve this problem seems bad to me, can't we just improve the logic used there to have more freedom ?
Cheers,
Mehdi
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
